Beautify and minify HTML, CSS, JavaScript, SQL and XML

Paste hard-to-read code to get it neatly indented, or minify it to make files smaller for production.

About Code formatter

Choose the language and paste code. “Format” indents and breaks lines for readability; “Minify” strips spaces, line breaks and comments so files load faster, showing the size before and after.

This formatter favours speed and handles everyday code; for large projects use a tool such as Prettier in your development setup.

FAQ

Will minifying break my code?

Not if the original is valid, but test before deploying.

More tools here

Other tools you may like