HTML formatter
Indent messy HTML so the structure is easy to read, or minify it for production, with 2, 3, 4 spaces or tabs.
- Runs in your browser
- No upload
- Result stays on your device
Privacy & limitsRuns in your browser. Nothing is uploaded.
Input content stays in this tab; Refentra does not upload or store it. Optional aggregate action counts are sent only with your usage consent. Clear the workspace when finished.
Supported profile: HTML parser formatting preserves significant whitespace; input is never rendered or executed. 100,000 units. Minify compacts tag/attribute syntax without collapsing text whitespace. Ordinary comments are removed only without script/template content; runtime markers remain.
Maximum text: 200,000 UTF-16 units; parser limits can be smaller. Worker time limit: 15 seconds (regex 1.5 seconds).
Check the input and the result
- Prepare and choose the operation
Paste HTML and choose formatting or minifying. The tool parses the markup as inert text and doesn't load a page.
- Check a concrete example
Use this sample and compare the indicated result: <p>Hello <b>world</b>.</p> → minify → <p>Hello <b>world</b>.</p>
- Check the output before you reuse it
Check the spaces between inline elements and the text that has to be kept. Removing every whitespace character would change the words as they appear on screen.
Answers for this task
Does formatting sanitize dangerous HTML?
No. Inert parsing stops anything from running here, but the output may still contain active markup when you use it elsewhere.
What should I check if the input fails?
Reduce the input to below 100,000 UTF-16 units and check the nesting. Malformed HTML may be normalized by the HTML parsing rules.
Where does this tool stop?
The tree is capped at 20,000 nodes and depth 64. This is not browser compatibility testing, CSS rendering or HTML security certification.