CSS & JavaScript Minifier
Minify JavaScript with Terser and CSS with a safe whitespace and comment remover, and see how many bytes and percent you save.
Runs on your device
Result
Results appear here after you select “Minify”.
What it does
Smaller files load faster. JavaScript is parsed and compressed by Terser, the minifier used by most build tools; CSS has comments and unnecessary whitespace removed.
How to use it
- Choose JavaScript or CSS.
- Paste the code.
- Copy or download the minified output.
Example
The example fills in realistic values and runs the tool. Select Try an example above to see it.
When it helps
- Quick fixes on sites without a build step.
- Inline scripts in email templates.
- Measuring how much minification saves.
Questions
Is it safe for any JavaScript?
Terser preserves behaviour for valid code. Syntax errors are reported instead of producing broken output.
Does the CSS minifier rename classes?
No. It only removes comments and whitespace and shortens zero units.
More developer tools
See all 25- HTTP Status Code Lookup Look up what any HTTP status code means, from 200 OK and 301 redirects to 404, 429 and 503, with practical notes for debugging.
- User Agent Parser Parse a browser user agent string into browser, version, operating system, rendering engine and device type. Shows your own by default.
- XML Formatter & Validator Pretty print and validate XML for sitemaps, RSS feeds, SOAP and config files, with clear well formedness errors. Parsed safely, never executed.
- Password Strength Checker Check how strong a password is with an entropy estimate, common password and pattern detection, and an estimated offline cracking time.
- JSON Formatter & Validator Format, validate, minify or key sort JSON with clear error messages. Runs in your browser, so API responses and configs never leave your device.
- Base64 Encoder & Decoder Encode text to Base64 or Base64URL and decode it back, with full UTF-8 support for accents, Urdu script and emoji.
People also use
Browse all 200 tools- Image Cropper Crop an image to an exact pixel rectangle, or to a centred aspect ratio such as 1:1, 4:3 or 16:9. Precise, keyboard friendly and local. Image
- Matrix Calculator Compute the determinant, inverse, transpose or product of matrices up to 8 × 8 using partial pivoting for numerical stability. Student & maths
- Military Time Converter Convert 24-hour military time such as 1730 to standard 5:30 PM and back, with a full military time chart for quick reference. Time & productivity
- US Federal Income Tax Calculator 2026 Estimate 2026 US federal income tax by bracket for single and married filers, with the standard deduction, effective rate and marginal rate. Personal finance