Step 1 of 3
Install it
Search for the extension in the VS Code Extensions view and click Install, or run the command above in a terminal. It takes about a minute.
Install it, open a CSS or JavaScript file, and press Ctrl+Alt+M (Control+Option+M on a Mac). Your file gets smaller, you see how many bytes you saved, and nothing leaves your computer.
code --install-extension miguel-colmenares.css-js-minifier01 · Why
Step 1 of 3
Search for the extension in the VS Code Extensions view and click Install, or run the command above in a terminal. It takes about a minute.
Step 2 of 3
Open any .css or .js file you already have. No project setup, no config file.
Step 3 of 3
Press Ctrl+Alt+M (Control+Option+M on a Mac), or right-click and choose Minify this File. A message shows the size before and after.
Offline and fast
CSS goes through LightningCSS and JavaScript through oxc-minify, two native Rust engines that run locally. No account, no API key, no network.
Your workflow
Keep your original and write style.min.css next to it, or turn on minify on save. Undo works like any other edit.
Seven languages
The extension follows your VS Code display language.
02 · Docs
Install the extension, use it, and get help. The pages for contributors are at the end.
Step-by-step install guide for CSS & JS Minifier: from the VS Code Marketplace, from a downloaded file, and soon from Open VSX.
Minify your first CSS or JavaScript file in about a minute.
The two commands of the extension, every place to find them in VS Code, and the keyboard shortcuts for Windows, Linux and macOS.
The five settings of the extension, what each one does, and ready-to-copy settings.json snippets for common setups.
Real before and after for CSS and JavaScript, with sizes measured in bytes.
Short answers to the questions people ask most about CSS & JS Minifier.
code --install-extension miguel-colmenares.css-js-minifier