Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Developer Utilities Beta

Code Minifier

Paste code and get it minified by Terser, csso and html-minifier-terser — all inside this tab. Choose a language or let the tool detect one, pick how aggressive the compression should be, and watch the byte count drop. The minifiers are downloaded from this site the first time you use them, and nothing you paste ever leaves your device.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Auto-detect reads the input and picks a minifier, or choose one yourself.

Safe keeps names and structure. Aggressive squeezes harder but may rename top-level code or drop unused declarations.

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

What the Code Minifier does

Paste JavaScript, TypeScript, CSS, HTML or JSON and the tool returns the minified text plus input bytes, output bytes, bytes saved and percent saved. JavaScript and CSS go through Terser and csso, HTML through html-minifier-terser, JSON is compacted, and TypeScript is stripped to plain JavaScript first.

When to reach for it

Use it when a bundle, stylesheet or page needs to ship smaller and you want to eyeball the result before wiring a build step. It is also handy for checking how much a snippet would shrink, since the byte figures come from the same run.

Choosing a language and compression level

Language defaults to Auto-detect, which reads the input and picks a minifier without loading one. Compression defaults to Safe, removing only whitespace, comments and redundancy; Aggressive renames identifiers, drops unused top-level code and assumes a modern browser, so use it for build output rather than code you read by hand. If Auto-detect finds TypeScript while you chose JavaScript, it points at the TypeScript option instead of a syntax error.

Where minification stops

JSX and Vue single-file components cannot be minified here, because JSX has to be compiled and a single-file component mixes three languages. Broken HTML tags and CSS with nested selectors or empty declaration values raise readable errors rather than emitting broken output.

Where your code goes

Every minifier runs in this tab; the library files are downloaded from this same site on first use, and your pasted code is never uploaded.

Questions

Does my code leave the browser?

No. Every minifier runs in this tab. The minifier files are downloaded from this same site the first time you use them, and your input is never uploaded.

Why did the first run take a moment?

The minifier for the language you picked is only downloaded when you first use it. Later runs reuse what is already loaded, so they are almost instant.

What is the difference between Safe and Aggressive?

Safe only removes whitespace, comments and other redundancy. Aggressive also renames local and top-level identifiers, drops unused top-level code and applies optimisations that assume a modern browser — so use it for build output, not for code you read by hand.

Does it handle TypeScript?

Yes. Type annotations, interfaces, enums, generics and namespaces are stripped first, then the JavaScript is minified. The result is plain JavaScript.

Can it minify JSX or Vue files?

No. JSX has to be compiled before it can be minified, and a single-file component mixes three languages. Transform them to plain JavaScript or plain HTML first.

Is the byte count gzipped?

No, it is the raw size of the text in UTF-8 bytes, before and after minifying. Gzip would shrink both numbers further, but by a different amount.

See category