Skip to content
Ovatly

JavaScript Minifier

100% PrivateDeveloper Tools

Minify JavaScript in your browser by removing comments and unnecessary whitespace.

Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.

  1. 1Paste your JavaScript into the input box.
  2. 2Press Minify JavaScript.
  3. 3Check the size report to see the saving.
  4. 4Copy or download the minified code.

About this tool

The JavaScript Minifier removes comments and unnecessary whitespace from JS code in your browser. Unlike a naive find-and-replace, it tokenizes the code first, so text inside strings, template literals and regular expressions is never mistaken for a comment, and newlines that JavaScript's automatic semicolon insertion depends on are kept.

Related tools

Advertisement

Part of Ovatly's free tools in Developer Tools.