Text, Data & Code tool
Code Minifier
Minify JavaScript, CSS or HTML in your browser, compare UTF-8 file sizes and copy or download the result. Conservative defaults keep JavaScript names and disable CSS rule restructuring.
Less code weight. Same original.
Reduce JavaScript, CSS or HTML file size without running your code. Everything is processed in this browser.
JavaScript keeps names, logic and comments. CSS keeps /*! important comments */ and disables rule restructuring; ordinary CSS comments are removed. HTML keeps comments, scripts and styles unchanged. Always test the output before publishing.
0 / 200,000 characters
This reduces file size, not bugs or security risks. Your source is never executed or rendered as a webpage. No code is uploaded or saved by this tool. The preview shows up to 100,000 characters; copying and downloading include the whole result. Need JSON? Use the JSON Formatter.
Processed privately in your browser — your entries are not uploaded.
Good to know
How this tool works
Choose your language, paste code and press Minify code. Compare the file sizes, then copy or download the output. Keep your original and test the result before publishing. HTML whitespace removal is optional because spacing may affect layout.
Frequently asked questions
What is Code Minifier useful for?
Shrink JavaScript, CSS and HTML privately, with file-size comparisons. Validate a small sample before processing important data, and keep a copy of the original input.
Is my information stored?
Your text is processed locally in a browser worker. It is not uploaded by this tool or saved in browser storage. Clear releases the working input and result. Downloads remain in your normal download folder.
Will the result behave exactly the same?
Conservative defaults reduce risk, but always test your result. JavaScript variable names and comments remain; CSS rule restructuring is disabled. Ordinary CSS comments are removed, so mark licence notices with /*! ... */. HTML keeps comments and embedded code. Framework templates and TypeScript are not supported.
What do the size figures mean?
Sizes are UTF-8 bytes before server compression such as gzip or Brotli. A tiny file may be unchanged or larger. Up to 200,000 input characters are supported, with a cancellable ten-second processing limit.