Docker Compose Generator
Build a docker-compose.yml with databases, caches and health checks.
Re-indent HTML without breaking whitespace-sensitive elements.
The HTML Formatter re-indents markup while keeping inline elements on one line and leaving pre and script contents alone — so a sentence containing a link is not chopped into three, and whitespace that is content survives.
Paste HTML and get it back readable: one block element per line, children indented under their parent, and inline elements kept on the line they belong to so a sentence containing a link does not get chopped into three.
The parser is the forgiving kind, because real HTML is. Unclosed paragraphs and list items, unquoted attribute values and stray closing tags are all handled the way a browser handles them, and anything it had to assume is reported. Script and style contents are indented but not reformatted, and boolean attributes stay bare rather than being expanded into attribute="attribute".
A line break between two inline elements adds a space, so they are deliberately kept together rather than each given a line.
Whitespace inside pre is content. Script and style bodies are indented as blocks but never reformatted.
Unclosed paragraphs and list items, unquoted attributes and stray closing tags are all handled the way a browser handles them.
Anything the parser had to infer is listed, so malformed markup is visible rather than silently corrected.
disabled stays disabled rather than being expanded to disabled="disabled", which is the modern convention.
A full page, a fragment, or something copied out of developer tools.
Two spaces, four spaces or a tab.
Anything the parser had to assume — an unclosed tag, a stray closer — is listed.
Take it to your clipboard or download it as an .html file.
Whitespace between block elements is insignificant, so no. Inline elements are deliberately kept on one line, because adding a line break between two inline elements does add a space.
Its contents are preserved exactly. Whitespace inside pre is content, so re-indenting it would change what the page shows.
It closes what a browser would close and reports each assumption, so the output is well-formed. It does not guess at intent — a stray closing tag is reported, not silently repaired.
No. disabled stays disabled rather than becoming disabled="disabled", which is the modern convention and shorter.
What people who use the HTML Formatter think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the HTML Formatter. It takes half a minute and no account.
Write the first reviewBuild a docker-compose.yml with databases, caches and health checks.
Reformat a MAC address between every notation, and decode what it means.
Decode a JWT and read its header, claims and expiry in plain English.
Generate realistic test rows in JSON, CSV or SQL from fields you choose.
Validate an IBAN's length, country and mod-97 checksum, and generate test ones.
Convert between bytes, KiB, MB, GB and bits, in both systems.
Convert a name between camelCase, snake_case, kebab-case and the rest.
Turn text into a block-letter ASCII banner for a README or a CLI.