Code Minifier — JavaScript, CSS, HTML & JSON
Shrink JS, CSS, HTML & JSON safely — shows the bytes saved. Runs in your browser.
Stays on your device. This tool runs in your browser — nothing you paste or open ever leaves it. Nothing uploaded, nothing to leak.
↳ received from
Help us improve
Was this tool useful? Tap a star.
Thanks — your rating helps others find it.
A code minifier strips the whitespace, comments and other non-essential characters from code to make the file as small as possible, so pages load faster. Paste JavaScript, CSS, HTML or JSON, pick the language and press Minify — JavaScript is minified with Terser (a real parser, so it never breaks your code), and everything runs in your browser.
Why minify
Smaller CSS, JS and HTML mean fewer bytes to download and faster pages — which helps Core Web Vitals and, in turn, SEO. Minify production assets before you deploy, and keep the readable original in source control. To reverse minified code for reading, use the Code Beautifier.
FAQ
Will minifying break my code?JavaScript is minified with Terser, which parses the code into a syntax tree first, so the output is functionally identical. CSS and JSON minification are lossless, and the HTML minifier is conservative — it leaves the contents of script, style, pre and textarea untouched.
Is my code uploaded?No. Everything is minified in your browser — nothing is sent to a server or stored.
Can I un-minify (beautify) code?Yes — the Code Beautifier re-indents minified code so you can read it again.