HTML Formatter
Beautify HTML with configurable indentation, line wrapping and attribute layout, without ever rendering or running it.
Open toolPreview HTML and CSS safely in an isolated, offline sandbox at phone, tablet and desktop widths.
Paste HTML (and optional CSS) and see it rendered instantly. The preview is a sandboxed iframe with its own empty origin, so it can't read this site's data, and a strict Content-Security-Policy blocks every network request: external images, fonts, styles, scripts and form posts never load, and links are disabled. Pasted markup therefore can't track you or contact another server.
Scripts don't run unless you turn on “Run scripts”, which keeps the same isolation. Switch between phone, tablet and desktop widths, reload, and download the HTML. Everything runs in your browser. Nothing you enter is uploaded, logged or stored.
Your code or text
Pasted or opened from a file
Processed in this browser
Instant, in-browser. Nothing is uploaded.
Your result
Ready to download or copy
Paste HTML, and CSS if you have it separately.
Pick a preview width; turn on scripts only for code you trust.
Download the combined HTML when you're done.
Zero-upload architecture
Free, with no sign-up or watermark · Your files stay on your device
Launch the app and add your file. There is nothing to install and no account to create.
Pick a preview width; turn on scripts only for code you trust.
Download the combined HTML when you're done.
Beautify HTML with configurable indentation, line wrapping and attribute layout, without ever rendering or running it.
Open toolCheck pasted HTML for common accessibility problems, with WCAG references and line numbers.
Open toolConvert HTML to valid JSX for React: className, htmlFor, style objects, self-closing tags and SVG props.
Open toolShrink HTML safely: remove comments and collapse whitespace while leaving pre, textarea, script and style contents untouched.
Open tool