Uttir

JavaScript Minifier

Quick JS minifier that strips comments and collapses whitespace. Best for trusted, simple code snippets.

JavaScript Minifier — A lightweight JavaScript minifier that strips block and line comments and collapses whitespace. Useful for one-off scripts, bookmarklets, and snippets where you want a quick size reduction without setting up a build pipeline.

Your JavaScript is processed locally and never sent over the network.

Was JavaScript Minifier useful?

What is javascript minifier?

A lightweight JavaScript minifier that strips block and line comments and collapses whitespace. Useful for one-off scripts, bookmarklets, and snippets where you want a quick size reduction without setting up a build pipeline.

CAUTION: This is a syntactic minifier, not a real parser. It does not understand strings, template literals, or regular expressions, so it can mangle code that contains // or /* * / inside those constructs. For production code, use Terser, esbuild, or SWC.

How to use it

  1. Paste your JS

    A snippet, a function, or a small module.

  2. Read the minified output

    Comments and excess whitespace are stripped.

  3. Copy

    Grab the result for use elsewhere.

Examples

Comment stripping

Block and line comments go away.

/* greet */ const greet = (name) => {
  console.log("hi", name); // say hi
};

Result: const greet = (name) => { console.log("hi", name); };

Whitespace collapse

Multiple spaces and newlines become one.

const    a  =   1;

Result: const a = 1;

Frequently asked questions

Related tools