Paste untidy or minified HTML and get it back indented and readable. Everything runs in your browser.
How It Works
Drop minified, single-line or unevenly indented HTML into the left pane, or open an .html file from your computer. The sample shows what a messy page looks like.
Choose 2 spaces, 4 spaces or tabs, decide whether to keep your blank lines, set a wrap width if you want one. The formatted result updates on the right as you change options.
Copy the formatted HTML, download it as formatted.html, or publish it straight to a live link. No account is needed for the 30-minute link, and claiming it is free.
About This Tool
It takes markup that is hard to read and gives it back with one tag per line, nested elements indented, and nothing about the page itself changed.
HTML gets messy fast. A page exported from a builder often arrives on one enormous line. A snippet from ChatGPT or Claude might mix two-space and four-space indentation across a few edits. A file a designer handed over was minified for production and is now impossible to edit. This HTML formatter reads the markup, works out how the elements nest, and writes it out again with consistent indentation so you can see the structure at a glance. If you just need to format HTML once and move on, paste, copy, done; the options are there for when the default is not what your editor expects.
Anyone holding an HTML file they did not write from scratch. If you are pasting a landing page from an AI chat, tidying a template from a course, or trying to find the one <div> that never got closed in a client's site, a readable copy is the first step. Developers use an HTML beautifier before a code review, and writers use one to make sense of the export from a CMS. It is also the quickest way to compare two versions of a page: format both and the differences line up.
Formatting runs entirely in your browser using the same open-source library that powers the pretty-print or “format document” command in many code editors. Your HTML is never sent to a server while you format it. You choose the indent style (2 spaces, 4 spaces or tabs), whether to preserve the blank lines you already had, an optional line-wrap width, and whether to indent the <head> and <body> inside <html>. The output updates as you type, and “Use as input” lets you feed the result back in to try different options. The status line shows the size and line count of both sides, because formatted HTML is almost always larger than the minified version it came from.
A formatter indents; it does not repair. Missing closing tags, stray quotes and broken attributes stay as they were, though they are usually far easier to spot once everything is indented. Content inside <pre> and <textarea> is left untouched, since whitespace there is meaningful, and inline elements are kept on their line so text does not gain unexpected gaps. If you need to see how the page actually renders, paste it into the HTML viewer, and if you want the opposite of this tool, the HTML minifier strips the whitespace back out.
Once the HTML is clean, the natural next step is to see it live. The publish button below the formatter puts your page on a free OxyPages subdomain with HTTPS, in seconds, with no account. The link lasts 30 minutes; claiming it is free and keeps it permanently, with your own address and, on paid plans, a custom domain. Instant publishing accepts pages up to 5 MB. Read how it works or compare plans.
Questions
More Free Tools
Every tool here runs in your browser and ends the same way: one click and your HTML is on a live link.
Minify HTML to shrink your page: strip whitespace and comments, collapse attributes, see the bytes saved. Then publish the smaller file for free.
Paste or drop an HTML file and see it rendered instantly. Preview on desktop and mobile, then publish it as a live website in one click.
Write or paste HTML, CSS and JavaScript and run it in the browser. Live preview, console output, then host the result for free.
Try It Now
Still Here? Drop It In.
The whole pitch fits in one sentence: your HTML, on a link, in seconds.
Drag and drop your HTML file(s), folders, or ZIP file
or ·
No account needed. Your unclaimed website stays live for 30 minutes on a free subdomain. Claim it to your account to keep it permanently.