New
HTML Formatter
Runs in browserBeautify or minify HTML in your browser. Choose indentation, copy or download .html, and load files from disk — all client-side.
HTML Formatter tool
1
Output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Files never leave your browser.
Drag and drop a file here, or tap to select
Chain to another tool
Send this output to another tool instantly — no copy-paste needed.
Produce output above to enable chaining.
How to use
Choose mode
Use Beautify for readable markup or Minify for a single-line build.
Set indentation
For Beautify, pick 2 or 4 spaces for each nesting level.
Save HTML
Copy the output or download a .html file; upload a file via the drop zone below.
Examples
Minified snippet
Beautify expands tags onto multiple lines.
Input<div><span>Hi</span></div>Output<div> <span>Hi</span> </div>
Frequently asked questions
- Is my HTML uploaded?
- No. Formatting uses js-beautify entirely in your tab.
- Does it change attribute order?
- The formatter focuses on whitespace and line breaks; attribute order may follow the beautifier defaults.
Related tools
You might find these useful too.