← All tools

HTML Formatter and Minifier

Parse HTML5 locally and format attributes or compact tag syntax while preserving inline text, pre, textarea and raw-text whitespace.

html-formatterLOCAL WORKSPACE

Enabling local controls…

Each input: 1 MiB UTF-8; output: 2 MiB. Loading stops after 15 seconds; processing after 2 seconds. Content stays local, without uploads or storage.

Formatting adds tag-internal line breaks only. Compacting retains all text whitespace, including inline, pre, textarea and raw text.

Enter input or load a sample, then run.

If clipboard access is denied, select the read-only output manually. Input HTML, SVG, CSS and JavaScript are never rendered or executed.

How to use this tool

Paste a document or fragment and choose a mode. Formatting adds line breaks inside tags only; compacting keeps text whitespace. HTML5 parsing may normalize tag syntax.

When not to use it

Output remains source text and is never rendered. This is conservative serialization, not sanitization or aggressive whitespace removal. DTD/entity declarations are rejected.

Read the guide →