HTML & CSS Formatter
Beautify messy HTML or CSS with clean indents, or minify it to cut the file size.
Runs in your browser. Files stay on this device.Built with js-beautify (MIT)
How to use HTML & CSS Formatter
- 1Paste HTML or CSS, or drop a file.
- 2Pick Beautify or Minify, and the indent you like.
- 3Copy the result or download the file.
Questions
Will minifying break my page?
It only removes comments and spaces that make no difference. A space between two words or inline tags like <b> stays, and pre, textarea and script content is left alone.
Does it format JavaScript?
Script blocks inside an HTML page are tidied along with the page. For standalone JavaScript, use a JavaScript formatter.
Is my code uploaded?
No. It is formatted in your browser.
Is it free?
Yes. No account, no watermark and no daily limit.
Related tools
- DeveloperBase64 EncoderEncode text or files to Base64 and decode it back, with URL-safe and data URL options.
- DeveloperDiff CheckerCompare two texts and see what was added and removed, line by line or word by word, and download a patch.
- DeveloperHash GeneratorGet the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 of text or any file, and check it against a hash you were given.
- DeveloperJSON FormatterFormat, check and minify JSON, with the exact line of any error.
- DeveloperJWT DecoderRead the header and claims of a JSON Web Token, see when it expires, and check an HMAC signature.
- DeveloperRegex TesterTest JavaScript regular expressions live: every match highlighted, capture groups in a table, and a replace preview.