Pretty-print or minify HTML instantly in your browser, with adjustable indentation.
Updated
/ 5 - Be the first to rate this tool Thanks for rating!
Verification failed - please try again.
Quick check
Please verify you're not a robot to submit your rating.
Give feedback
Tell us what you think about Format and beautify HTML online.
- Runs entirely in your browser — your HTML is never sent to a server
- Preserves script, style, pre, and textarea contents verbatim
- Free, no account required
How it works
-
1
Paste the code or data you want to format.
-
2
Choose pretty-print or minify, and set the indent width if you like.
-
3
The formatted result updates instantly.
-
4
Copy the result, or download it as a file.
Why use this tool
Every dev utility, one place
Format, convert, encode, decode, and generate — no more juggling ten tabs.
100% private, always
Every tool runs in your browser — your code and data are never sent anywhere.
Works on any device
Runs on Windows, Mac, Linux, iOS, and Android — nothing to install.
Instant results
No queues, no build step — results update as you type.
Built to handle real data
Full Unicode support and RFC-compliant parsing, edge cases included.
Free, always
Free to use, with no rate limits, sign-up, or trial period.
Frequently asked questions
Contents inside style and script tags are generally passed over to avoid breaking application logic.
It correctly recognizes self-closing tags and does not erroneously attempt to indent following siblings.
Yes, the contents of preformatted text blocks are strictly ignored by the indentation engine.
It collapses multiple spaces into one outside of text blocks to create a cleaner DOM structure.
It can infer some missing structural tags, but severely broken markup might indent unpredictably.
From the blog
Reading a JWT Without Trusting It: Claims, Expiry, and the Signature Trap
Decoding a JWT takes a second. Verifying one is a different job entirely — and confusing the two is how auth bugs ship. Here is how to read a token safely while you debug.
Mastering Base64: What It Is, How It Works, and When Not to Use It
Base64 is everywhere in modern web development, from data URIs to authentication headers. Here is a deep dive into how it works and common pitfalls to avoid.
Demystifying JSON: How to Troubleshoot Common Parsing Errors
JSON is the backbone of web APIs, but syntax mistakes can halt your code. Here is how to identify and fix missing commas, unescaped strings, and trailing characters.
Related tools
Format and minify CSS online
Pretty-print or minify CSS instantly in your browser, with adjustable indentation.
Format and minify JavaScript online
Pretty-print or minify JavaScript instantly in your browser, correctly handling strings, template literals, regex, and comments.
Format and validate JSON online
Paste JSON to pretty-print, minify, and validate it instantly in your browser.
Format and beautify SQL online
Pretty-print or minify a SQL query instantly in your browser, with clause-based line breaks.
Format and beautify XML online
Pretty-print or minify XML instantly in your browser, with adjustable indentation.
Format and re-indent YAML online
Normalize inconsistent YAML indentation to a consistent width instantly in your browser.
Convert HTML or a web page to PDF for free
Paste HTML or enter a public web page address and download it as a PDF, with your choice of page size, orientation and margins.
Pick colors from an image for free
Click anywhere on an image to read its exact HEX and RGB color, right in your browser.
Apply image filters online for free
Adjust brightness, contrast, and saturation, or apply grayscale, sepia, and invert filters, right in your browser.
Convert an image to Base64 for free
Encode an image file to a Base64 string, or decode Base64 back to an image.
Convert an image to a favicon (ICO) for free
Turn a square image into a multi-size .ico favicon file, right in your browser.
Add a watermark to an image for free
Overlay repeating or single text watermarks on an image, right in your browser.