HTML Formatter
Free HTML formatter and beautifier: turn minified or messy HTML into clean, indented code that is easy to read. Pretty print HTML in one click.
- 100% free
- No sign-up
- Runs in your browser
Webmaster Tools
About the HTML Formatter
The HTML Formatter, also called an HTML beautifier, turns minified or messy HTML into neatly indented code, with each element on its own line. It makes code easy to read, review and edit.
You also see the number of input and output lines, tags and the size. Everything runs in your browser, so your text or code never leaves your device.
How to use this tool
- 1Paste your HTML.
- 2Read the formatted result.
- 3Copy it back into your editor.
Best-practice tips
- Format code before you edit it; mistakes are much easier to see.
- Minify it again before going live with the HTML Minifier.
- Use it to read the source of a page copied from View Page Source.
Formatting vs minifying
Formatting adds indentation and line breaks so people can read code. Minifying removes them so browsers download less. Work on formatted code, publish minified code. Use the HTML Minifier for the live version, and the XML Formatter for sitemaps and feeds.
Answers
HTML Formatter FAQs
A tool that adds indentation and line breaks to HTML so it is easy to read.
No. Browsers ignore the extra spaces, so the page looks the same.
Yes, with no sign-up.
Related tools
Continue with these related webmaster tools.
Meta Tag Generator
Free meta tag generator: create your title tag, meta description, robots and canonical tags with a live Google search preview and character counter.
View Page Source
Free page source viewer: see the HTML source code of any website with line numbers, a search filter and tag counts. Works on any device, including phones.
XML Sitemap Generator
Free XML sitemap generator: crawl your website (up to 5,000 pages) or paste a URL list and download a valid sitemap.xml. Leaves out redirects, errors and noindex pages.