Format HTML source without rendering it. Free, private, runs in your browser.
100% private — your files and text never leave your browser. All processing happens locally on your device.
HTML Formatter works with full documents and partial fragments. It formats source tags, text, comments, and script or style blocks without rendering the pasted markup as a live page.
User-provided HTML is shown as escaped text, not injected into the page. That keeps scripts, handlers, and unknown markup from running while you clean up the source.
Phase 4 avoids adding Prettier for bundle size. The local formatter handles common source cleanup and malformed-tag warnings, while complex framework templates may still need project tooling.
No. The output is shown as escaped source text only, which avoids running pasted scripts or rendering untrusted markup.
Yes. Full documents and partial HTML fragments can be formatted or minified.
Script and style blocks are preserved as source text. The formatter does not execute JavaScript or apply CSS.
No. Phase 4 uses a lightweight local formatter to avoid adding a large dependency for this release.
The formatter reports obvious mismatch or unclosed-tag warnings and still gives source output when it can.