HTML Pretty Print
Pretty print HTML with two, three or four spaces, or tabs. Consistent indentation applied throughout, instantly and privately.
Input
Output
Ready
Drop a file to load it
About this tool
Indent HTML consistently with two, three or four spaces, or tabs.
When you would use it
- Matching a project’s indentation convention
- Making HTML readable for review
Worked example
<div class="card"> <h2>Ada Lovelace</h2> <p>Score: <strong>91.5</strong></p> </div>
<div class="card"> <h2>Ada Lovelace</h2> <p>Score: <strong>91.5</strong></p> </div>
Things worth knowing
- Identical to the HTML formatter, with the indentation control front and centre.
Questions
Frequently asked
Which indent width should I pick?
Two spaces is the most common default. Match whatever your repository already uses so diffs stay clean.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Does it work offline?
Yes. JSONWorks is installable as a progressive web app and caches itself on first visit, so every tool keeps working without a connection.
Related