HTML Formatter
Turn minified or messy HTML into readable, consistently indented markup — one tag per line, void elements handled correctly.
How to use
- Paste minified or messy HTML.
- Read the formatted markup as you type.
- Copy the result into your editor.
Example
Input: <div><p>Hello</p><br><span>world</span></div>
Output: Nested, indented lines; <br> stays on one level
How it works
The HTML is parsed and re-printed with consistent indentation, so nested elements become readable. The structure and content are unchanged — only whitespace and line breaks are adjusted.
Limits & compatibility
- Inline text flows are split onto their own lines by design.
- pre/script contents are re-indented like any text node.
- Tag soup is formatted as-is — malformed nesting is not repaired.
Privacy
Your markup never leaves the browser. There is no server call, no storage and no logging of content.
Related tools
Questions about HTML Formatter
Is my input private?
Yes. This tool runs entirely in your browser — your input never leaves your device, is never uploaded to a server and is never stored.
How accurate is the result, and what are the limits?
The tool page states its formula and limits openly. Check them before relying on a result, and verify anything consequential — financial, legal, medical or safety-critical — against an authoritative source.
What happens to files I open with this tool?
Files are processed locally in your browser and never uploaded; closing the tab discards them. Text tools never store what you paste — it lives only in the page while you use it.