Free Online Minifiers - CSS, JavaScript, HTML, SVG
Shrink your assets before shipping them. Each minifier reports the size saved and runs entirely client-side.
6 tools in this section
Minify CSS Online
Compress CSS code by removing whitespace, comments, and redundant rules. Free online CSS minifier with size comparison.
Minify JavaScript Online
Compress JavaScript code by removing whitespace and shortening variables. Free online JS minifier with size comparison.
Minify & Optimize SVG Online
Optimize SVG files by removing metadata, comments, and unnecessary attributes. Free online SVG minifier.
Minify CSS Online Free
Minify CSS online free to shrink file size and speed up your site. Strips whitespace and comments in your browser, no upload, no signup.
Minify SVG Online Free
Minify and clean SVG code online for free. Removes editor metadata, comments, and redundant attributes to reduce SVG file size, no upload.
Minify JS - Free JavaScript Minifier
Compress JavaScript by removing whitespace and comments. Free JS minifier with a size reduction report, no build tool needed.
About Minifiers
Three minifiers sit behind these six pages: one for CSS, one for JavaScript and one for SVG. They are separate tools because the three formats fail in different ways when you strip them carelessly.
CSS is the safest of the three. Whitespace and comments carry no meaning between rules, so removing them cannot change what the stylesheet does. JavaScript is the riskiest, because a newline can end a statement, which is why its minifier offers a conservative mode alongside the aggressive one. SVG sits in between: most of its size is editor metadata and over-precise path coordinates, and cutting those is safe while cutting the wrong attribute is not.
Which One Should You Use?
Stylesheets
Use the CSS minifier. It is the lowest-risk of the three and usually the biggest single saving on a page that ships a hand-written stylesheet.
Scripts
Use the JavaScript minifier and pick the engine deliberately: the parsing engine for a complete file, the text-level engine for a fragment you want to stay readable.
Icons and illustrations
Use the SVG optimizer. Files exported from a design tool routinely carry editor metadata and long coordinate strings that no browser needs.
Common Questions
Will minifying break my file?
Do I still need a build step?
Full Tool Pages
About These Tools
Every tool in this section is free to use on ToolBox, with no account, no signup, and no usage limits. Almost all of them run entirely in your browser, so your files and data never leave your device; the few that have to fetch a page or call a service say so on their own page. Browse the full tool directory for everything else.