How to use HTML Formatter
Make a block of HTML easier to inspect by formatting nested elements with consistent indentation.
- Paste markup or open a file.
- Choose Indentation, format and inspect the result in the context where it will be rendered.
- Select Format and review the result.
Example input
<main><h1>Field Notes</h1><p>A notebook for daily <strong>ideas</strong>.</p></main>
Example use
Review a navigation template to find which list or element owns a piece of markup.
Output and compatibility
HTML whitespace can change rendering in inline or whitespace-sensitive contexts. A formatter cannot guarantee the same interpretation in every template language.
Troubleshooting
If a template contains custom delimiters or server-side expressions, check the output in its own build process. Preserve the original for comparison.
Use HTML to Text to extract readable copy instead of formatting tags.
Frequently asked questions
Will it load the page from a URL?
The tool works with pasted or local markup.
Does it optimize file size?
Use HTML Minifier for that goal.