JavaScript, CSS & HTML Minifier
Minify JavaScript with Terser, CSS and HTML safely, and see exactly how many bytes you saved. Free, no sign-up, and your files never leave your device.
Free, with no sign-up and no watermark. The file is processed in your browser and never uploaded.
Make files smaller for production. JavaScript is minified with Terser (dead code removal, shortened variable names, compressed expressions); CSS and HTML are minified conservatively — comments and extra whitespace are removed, while strings, url() values and <pre>/<textarea> content are left untouched. The saving is shown below the output.
Step by step
- Choose the language: JavaScript, CSS or HTML.
- Paste code: Or open a file.
- JavaScript option: Shorten variable names (mangling) gives the biggest saving; turn it off if code relies on function names.
- Download: Save as
minified.min.js,minified.min.cssorminified.html.
Handy for
Small sites
Minify assets for a site without a build tool.
Inline snippets
Shrink scripts you embed in HTML or emails.
Size checks
See how much a file shrinks before adding a build step.
Bookmarklets
Compress JavaScript into a single line.
Good to know
Licence comments starting with
/*!or containing@licenseare kept.ES modules (
import/export) are detected automatically.Always keep the original source — minified code is for shipping, not editing.
Questions
Is minified code the same as obfuscated?
No. Minification only makes code smaller; it can be formatted back into readable code, e.g. with the HTML/JS formatter.
Is my data sent anywhere?
No. Everything is processed by JavaScript in your browser tab — nothing you paste or open is uploaded, logged or stored on a server. You can even use the tool offline once the page has loaded.
More Developer Tools tools
- Base64 Encoder & Decoder — Encode and decode Base64 for UTF-8 text and any file, including the URL-safe variant.
- Image to Base64 Converter — Convert images into Base64 data URIs with ready-to-paste HTML and CSS snippets.
- Base64 to Image Converter — Paste a Base64 string or data URI to preview the image, detect its type and download it.
- URL Encoder & Decoder — Percent-encode or decode URLs and components, and break query strings into an editable table.
- HTML Entity Encoder & Decoder — Escape text into HTML entities (named or numeric) and decode entities back to characters.
- JWT Decoder & Verifier — Decode a JWT's header and payload with readable claims, and optionally verify its signature locally.