DevTilt

JavaScript Minifier

Reduce JavaScript size by stripping comments and unnecessary whitespace and shortening names where Terser can. Minification loads Terser on demand and stays in your browser.

Result

Paste code, then Minify. Libraries load in your browser.

How to minify JavaScript

  1. Paste valid JavaScript.
  2. Click Minify (Terser loads the first time you run it).
  3. Copy or download the compressed .js output.
  4. Syntax errors stop minify and show a parser message when Terser reports a location.

What is JavaScript Minifier?

Every byte in a JavaScript file adds to page load time. This minifier removes comments, whitespace, and unnecessary syntax using Terser — the same engine behind most production build pipelines — so you can shrink snippets without setting up a full bundler.

Why use DevTilt's JavaScript Minifier?

  • Terser-powered minification with dead code awareness
  • Removes comments and whitespace
  • Shows before/after byte size
  • Handles modern ES syntax

Common use cases

  • Shrinking an inline script for a landing page
  • Minifying a config snippet before embedding in HTML
  • Reducing payload size for a browser extension script
  • Quick minification without running webpack or Vite

FAQ

The formatter pretty-prints for reading. This page compresses code for smaller payloads. Invalid JavaScript fails minify instead of guessing.
No. Terser is loaded only when you minify. Formatter-only pages do not download it.
No. Source maps are ignored. Output is minified text you can copy or download as a .js file.
No. Minify runs locally. Treat pasted secrets as untrusted in any browser tab, but DevTilt does not send the input to a server.
Terser requires valid JavaScript. TypeScript-only syntax, missing brackets, or JSON pasted into the minifier will fail. Use the formatter or your editor to locate the parse error line when Terser reports a position.