JavaScript & CSS Minifier
Pick a language, paste your code and press “Minify”.
Your text and files never leave your browser — nothing is sent to a server.
How to use
- Choose JavaScript or CSS under “Language” and paste your code.
- Press “Minify” to remove whitespace, line breaks and comments. The size before and after, and the percentage saved, appear below the result.
- With “Shorten variable names” on, local variables inside functions are renamed to one or two letters for an even smaller file. Global names used elsewhere are left alone.
- Comments that start with /*! or contain @license are kept while “Keep license comments” is on.
FAQ
Can minifying change how my code behaves?
JavaScript is minified with Terser and CSS with CSSO, widely used open-source tools designed to keep behavior the same. Code that relies on eval or on function names may still behave differently, so test before you deploy.
Does it work with ES modules?
Yes. If the code contains import or export statements, it is minified as an ES module. Otherwise it is treated as a classic script and global names are not renamed.
Can I turn minified code back into readable code?
Line breaks and indentation can be restored with the JavaScript & CSS Formatter, but removed comments and shortened names cannot be recovered, so keep your original source.
Related tools
All tools
Unit Converters
- Unit Converter
- Temperature Converter
- Weight Converter
- Area Converter
- Length Converter
- Angle Converter
- Calorie Converter
- Data Size Converter
- Dry Volume Converter
- Electric Charge Converter
- Energy Converter
- Flow Rate Converter
- Force Converter
- Fuel Economy Converter
- Luminous Intensity Converter
- Magnetomotive Force Converter
- Power Converter
- Pressure Converter
- Radiation Dose Converter
- Speed Converter
- Time Unit Converter
- Volume Converter