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.

Help us improve Was this tool useful? Tap a star. Thanks — your rating helps others find it.
Be the first to rate

How to minify code

Paste your code, choose the language, and press Minify (or Cmd/Ctrl+Enter). The minified result appears ready to copy, with the original and new sizes and the percentage saved. JavaScript uses Terser for safe, AST-based compression; CSS uses CSSO; HTML and JSON are compacted losslessly.

Embed this tool on your site
<iframe src="https://techwhack.com/tools/dev/minify/embed" width="100%" height="440" frameborder="0" loading="lazy"></iframe> <!-- Powered by TechWhack -->
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.