Code Minifier
Minify JS, TS, JSX, TSX, CSS, HTML, JSON, YAML, XML, SVG, GraphQL, and SQL
Shrink code for production delivery
Removes comments and extra whitespace, and compresses where a real engine exists. This does not rewrite your algorithms — it makes the file smaller to download. Everything runs locally in your browser.
Compress with Terser — remove comments, whitespace, and shorten names.
Frequently asked questions
Common questions about the Code Minifier.
What does the Code Minifier do?
It shrinks code for production delivery by removing comments and extra whitespace and running real compressors where available. It does not rewrite your algorithms — it makes files smaller to download. Everything runs in your browser.
What languages does the Code Minifier support?
JavaScript, TypeScript, JSX, TSX, CSS, HTML, JSON, YAML, XML, SVG, GraphQL, and SQL. Choose a language, paste or upload your file, then minify.
What happens when I minify TypeScript, JSX, or TSX?
Types and JSX are compiled away into modern JavaScript, then minified with Terser. The download is minified.js. Keep your original source for editing — use the output for production.
Is minification done with real minifiers or just whitespace removal?
Real engines where it matters: Terser for JavaScript, Sucrase + Terser for TypeScript/JSX/TSX, CSSO for CSS, JSON/YAML parse-and-dump, GraphQL ignored-character stripping, SQL comment/whitespace compaction, and browser DOM cleanup for HTML/XML/SVG.
Does my code leave my device?
No. The Code Minifier runs fully in your browser. Nothing is uploaded to ToolsArk servers for minification.
Why did minification fail?
Usually the input has a syntax error the minifier cannot parse. Fix the reported error, confirm the correct language is selected, and try again.
Tags
Continue with these utilities
People frequently use these utilities together.