Developer utility · local minify

JS & CSS Minifier

Compress JavaScript and CSS before deployment. Paste code or drop files, remove comments and unnecessary whitespace, compare size savings, then copy or download .min files.

Drop JS or CSS files

Batch minify files locally, then download individual outputs or a ZIP package.

This is a deployment helper, not a security feature. Minification reduces file size; it does not protect secrets or prevent code review.

Paste code

Output

Summary

Original0 B
Minified0 B
Saved—

No files selected yet.

Batch results

FileModeOriginalMinifiedSavedDownload
No files minified yet.

What this tool does

  • Compresses JavaScript and CSS source files locally.
  • Strips empty lines, trailing whitespace, indentations, and block comments.
  • Retains license headers starting with `/*!` or `/**!` for open-source attribution.
  • Outputs single deployment-ready `.min` files or a ZIP archive containing all processed files.

Best for

Frontend developers and website managers optimizing lightweight static sites, theme templates, and inline page scripts for faster browser downloads.

Privacy Notes & Verified Badges

Browser-local No server upload No account required

The minification algorithm runs locally on your machine via JavaScript. Your source code is never transmitted over the internet.

Example Workflow

  1. Paste your raw code into the text area or drop code files in the target zone.
  2. Check whether you want to preserve license comments and use the `.min` suffix.
  3. Click Minify files (or Minify pasted code).
  4. Review size savings, copy results to the clipboard, or download the ZIP package.

Frequently Asked Questions (FAQ)

Does this obfuscate or scramble variable names?

No. This tool is a conservative minifier that removes comments and extra whitespace without renaming functions or variables, keeping risk low.

Can this minifier break my JavaScript code?

Since it does not mangle variables or restructure AST trees, it is highly safe. However, missing semicolons in original files can sometimes cause issues. Always verify the minified script before deployment.

Does it support ES6+ modules and CSS nesting?

Yes, it processes standard JS/CSS syntax since it relies on regular expression matching rules rather than strict older grammar trees.

Should I use this to protect my private API keys?

No. Minifying code does not encrypt or hide sensitive credentials. Any client-side code can be inspected and reversed by anyone loading the page.

Related Tools

PII Risk Scanner → Screenshot Privacy Cleaner → Submit-Ready File Kit →

How to use the JS & CSS Minifier

  1. Paste code into "Input code" and click "Minify pasted code", or drop .js, .mjs, .cjs or .css files onto the drop area.
  2. Leave Language mode on "Auto by extension" or force JavaScript or CSS for pasted code.
  3. Choose whether to keep license comments and whether to save files as .min.js / .min.css, then click "Minify files".
  4. Check the size summary and batch table, then copy the output, use "Download current", or download all files with "Download ZIP".

What it's useful for

  • Shrinking a hand-written stylesheet or script for a small static site without setting up a build tool.
  • Minifying a theme or plugin file before uploading it through a CMS file editor.
  • Getting a quick before/after size comparison for several files at once.

Good to know

  • The minifier removes comments and unneeded whitespace. Strings, template literals and regular expressions are copied as they are, and variable names are never renamed.
  • Comments starting with /*! or /**! are kept when the license option is on; in JavaScript, //! line comments are kept too.
  • Code that relies on automatic semicolon insertion across line breaks can change meaning once newlines are removed, so test the output before deploying.
  • Minification runs in the browser and the ZIP is built locally; no code is uploaded.

FAQ

Does it create source maps?

No. Only the minified file is produced. Keep your original files for debugging.

Will it break modern JavaScript?

It works character by character rather than parsing the full language, so most modern syntax passes through. Run your tests or load the page once with the minified file before shipping.

Why is the saving smaller than with other minifiers?

Tools that rename variables and rewrite code save more. This one only strips comments and whitespace, which is safer but less aggressive.