Minify the code.
Ship fewer bytes.
Remove comments and unnecessary whitespace from JSON, HTML, CSS, or JavaScript locally before you paste it into a project or CMS.
How do I minify CSS or JavaScript? Paste your code and get the minified version with the size savings shown — all locally.
Code minifier
JSON is parsed and re-serialized. HTML, CSS, and JavaScript use lightweight browser-safe minification; review output in your build or test process before publishing.
How to minify JSON, HTML, CSS, or JavaScript
- Paste your code — pick the language.
- Minify — whitespace and comments are stripped, size stats shown.
- Copy or download — and always test the minified output before shipping it.
When minifying pays
- Shaving kilobytes off an inline snippet
- Preparing a small JS file for a static deploy
- Seeing how much of a file is just whitespace
Good to know
Minification is not optimization — it does not remove dead code or rename variables, it only compresses syntax. JavaScript is the risky one: missing semicolons at line boundaries can change behavior after joining lines, so test the result, and keep the readable source as the source of truth. Related: formatter (the reverse trip).
Will my code leave this page?
No. The minifier operates on the text in this browser tab and creates no server request.
Why did JSON show an error?
JSON must be valid before it can be minified. Check commas, quotes, braces, and trailing commas.