PRIVATE BROWSER TOOL
HTML Formatter
Clean up HTML structure and indentation. Nothing is uploaded.
PRIVATE BROWSER TOOL
Clean up HTML structure and indentation. Nothing is uploaded.
CODE FORMATTERS · LOCAL PROCESSING
The HTML Formatter separates nested elements and adds consistent indentation so a snippet or document is easier to review. It is suited to cleanup and inspection rather than rewriting the semantics of your markup.
COMMON USES
THREE STEPS
PRIVACY
The operation runs on your device and does not require the input to be uploaded. Copy and download actions happen only when you choose them. Avoid treating encoded output as encryption, and follow your own security requirements for confidential data.
WORKED EXAMPLE
<main><p>Hello</p></main><main>
<p>
Hello
</p>
</main>The example is an HTML fragment. Complete documents may also include a doctype and the browser-created document structure.
METHOD & LIMITS
DOMParser builds an HTML document, then the formatter serializes either the full document or body fragment and adds line breaks.
The browser can repair malformed HTML and normalize markup. This is not sanitization; review inline whitespace and whitespace-sensitive elements before replacing production source.
References: DOMParser parsing behavior
PRACTICAL NOTES
No. It formats text and does not promise to remove unsafe scripts or attributes.
Yes. You can use it with a complete document or a smaller markup fragment.