Format HTML Text
HTML Formatter is used to Format HTML text, documents or files by indenting & syntax highlighting them.
The objects are layed out in a tree like structure which can be easily expanded/collapsed.
The desired indentation level can be selected from the settings.
All processing happens on the client-side, locally in your browser. No data is uploaded.
Paste HTML text below
Formatted HTML
Settings
How the input is converted. Each is explained below.
Select the indentation type of the output
History
- 2017-08-23Tool Launched
Settings explained
- Indentation
This setting governs how the output is indented, which varies with your text editor settings or the server side framework that generates the HTML. The indented output is easier for humans to comprehend: paste the minified or unformatted HTML a web server generates to see what's in it.
- Line Breaks
When off, the HTML is written on one line, with only the spaces that show on the page kept between its parts.
Background
HTML is the most widely used markup in the world.
It is served from a variety of sources running on different platforms.
Even though there has been a trend in the last few years towards having tighter control on the generated markup,
there still are old sites & archaic WYSIWYG editors that are plagued by markup generation issues.
As such, HTML markup is often plagued by formatting incosistencies.
This tool aims to solve these issues when you are trying to debug/edit the markup & don't have access to
a powerful HTML markup editor.
Read more at wikipedia