← Back to all browser tools
DEVELOPER TOOL / 75

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

Local minification

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

  1. Paste your code — pick the language.
  2. Minify — whitespace and comments are stripped, size stats shown.
  3. Copy or download — and always test the minified output before shipping it.

When minifying pays

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).

Advertisement
QUICK ANSWERS
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.