Client-side · Terser Engine

JavaScript Formatter & Minifier

Format or minify JavaScript code to inspect structure and payload size. Verify ECMAScript target options before minifying.

Source JS
Result

Concept & Workflow

What Is an Online JavaScript Formatter & Terser Minifier?

This utility combines readable JavaScript beautification with a browser-local Terser minification engine. Restore clean indentation for minified scripts or shrink production JS via whitespace removal and variable mangling.

  • Three modes: Beautify, Standard Minify, and Aggressive Mangle (short local names).
  • Byte-level savings: displays original bytes, output bytes, and compression percentage.
  • Syntax safeguard: warns if raw JSON or TypeScript-only syntax is pasted by mistake.

How to Format or Minify JavaScript Online

  1. 1Paste JS source: enter ES6+ JavaScript into the left editor, or click Demo.
  2. 2Pick an operation: click Beautify, Minify, or Mangle from the workspace toolbar.
  3. 3Inspect output & savings: review the resulting code and byte reduction on the right.
  4. 4Copy or download: copy the code or export script.min.js locally.

Documentation

JavaScript Minifier & Beautifier

Compress JavaScript code by removing whitespace and comments, or beautify minified code for debugging. Supports ES6+ syntax.

Reduce file size for production or expand compressed libraries for analysis. Uses industry-standard Terser for reliable minification.