HTML prettifier
Format HTML with consistent indentation using Prettier in a local worker. Choose a preferred line width and one attribute per line, find and replace literal text, and download the result. Pasted markup is treated as text and never rendered as a live page.
Find & replace in input
Undo: Ctrl/Cmd+Z · Redo: Ctrl/Cmd+Shift+Z or Ctrl+Y. Up to 20 steps and 4 million retained characters in this tab. Clear discards history.
Three small steps.
- Paste HTML or open a local text file.
- Choose indentation and format.
- Review the formatted markup and copy or download it.
A few things to know.
Preferred line width is a formatting hint, not a hard maximum. Formatting can change source layout. Strict whitespace sensitivity is used, but verify application-specific template behavior before replacing production files. HTML preview and remote URL imports are deliberately unavailable. Original parser details may be in English. Limit: 1 million characters.
How your privacy works →A little more clarity.
Will scripts in my HTML run?
No. Input and output are plain text editors. The formatter does not mount the markup in the page or load referenced images and scripts.
Does formatting sanitize HTML?
No. Formatting changes presentation of source code; it does not make untrusted HTML safe to render elsewhere.