Developer Tools
HTML Formatter
Beautify or minify HTML markup locally in the browser.
Your information is processed in your browser and is not uploaded to our servers.
HTML
Formatted output
About this tool
The formatter tokenises tags, comments and text, then reprints with two-space indentation or a compacted single block.
How to use
- Paste HTML.
- Beautify or minify.
- Copy the result.
Formula and methodology
Opening tags increase indent; closing tags decrease it. Void tags such as br and img do not increase depth.
Worked example
A one-line doctype document becomes a readable multi-line tree.
Frequently asked questions
Does this execute scripts?+
No. It only rewrites text.
Will it fix broken HTML?+
No. It pretty-prints what you give it.
Related tools
JSON Formatter
Pretty-print and minify JSON in the browser.
Open tool →
URL Encoder
Percent-encode URLs and query strings.
Open tool →
Slug Generator
Turn a title into a URL-safe slug with lowercase letters, numbers and hyphens.
Open tool →
Case Converter
Switch text between uppercase, lowercase, title case, sentence case, camelCase, snake_case and kebab-case.
Open tool →
JSON Validator
Validate JSON and show parse errors clearly.
Open tool →
Base64 Encoder
Encode text to Base64.
Open tool →