HTML Formatter & Beautifier
Pretty-print HTML with proper indentation and self-closed void elements.
Paste any HTML — even minified single-line markup — and get a clean, indented version. Void elements like <img>, <br> and <input> are emitted correctly, attributes are preserved, and indent width is selectable.
Common use cases
- Beautify minified HTML pulled from a deployed site or browser DevTools
- Make email-template HTML reviewable before approval
- Re-indent HTML snippets pasted from random docs and StackOverflow
- Inspect SSR output before debugging hydration mismatches
Frequently asked questions
Does it preserve attributes?▾
Yes — all attributes and their values are preserved exactly. Whitespace between attributes is normalised.
Will it break my Tailwind classes?▾
No. Class names are kept verbatim; only outer whitespace and indentation change.
Are inline scripts and styles re-indented?▾
Their content is preserved as a single text node. Use a dedicated JS or CSS formatter if you need their bodies reformatted.
Related tools
{}
JSON Formatter & Validator
Beautify, validate and minify JSON instantly in your browser.
↔
JSON ↔ CSV Converter
Convert JSON arrays to CSV and CSV back to JSON.
B64
Base64 Encoder & Decoder
Encode and decode Base64 strings, including UTF-8 and binary.
%
URL Encoder & Decoder
Percent-encode and decode URL components safely.