URSY.IOPART OF THE URSY NETWORKSign in400 free tools

Developer Tools

HTML Formatter

Pretty-print HTML via the browser’s own parser, inline tags kept inline.

Free No account Runs on this device
Developer Tools
Tool ready

Your inputs stay in this browser tab.

Powering up the tool…

TOOL HTML-FORMATT

What this tool does

About the html formatter

Fragment or document, normalisation disclosed.

How to use it

  1. Paste HTML (fragment or whole doc).
  2. Read the indented result.
  3. Note that the PARSER normalised it (as browsers do).
  4. Copy out.

Useful for

  • Clean pasted-from-anywhere markup.
  • Make view-source output reviewable.
  • Normalise before comparing two versions.

Straight answers

HTML Formatter FAQ

Why did my markup change slightly?

It went through a real HTML parser — the same forgiving machine browsers use — which closes implied tags and normalises structure. What you get back is what browsers were already seeing; sometimes that itself is the revelation.

Why are spans and links not broken onto lines?

Whitespace between inline elements is RENDERED in HTML — naive pretty-printers add visible gaps around links. This one keeps inline runs inline, which is the difference between formatted and broken.