MMaster Tools
DeveloperRuns on your device

JavaScript Minifier

Compress JavaScript with dead-code removal and variable renaming to reduce bundle size.

How it works

  1. 1

    Paste your JavaScript source into the input area.

  2. 2

    Press Minify JavaScript — terser compresses the code in your browser.

  3. 3

    Download the minified file or copy the output. Nothing is sent to any server.

Questions

What optimisations does the minifier apply?

It uses terser to remove dead code, shorten variable names, and strip whitespace and comments. The result is semantically identical to the original.

Will it break my code?

Terser is widely used in production build pipelines and is generally safe. If your code uses non-standard syntax it may not parse correctly — the tool will show the error message.

Is my JavaScript processed on a server?

No. Terser runs entirely in your browser as a WebAssembly bundle — your source code never leaves your device.

Should I minify already-minified code?

Running the minifier a second time usually makes no difference. Start from the readable source for the best reduction.

JSON Formatter

JSON Formatter

Paste compact or messy JSON and get it back neatly indented with your chosen spacing.

JSON Minifier

JSON Minifier

Remove all whitespace and line breaks from a JSON document to shrink it as small as possible.

JSON Validator

JSON Validator

Check whether a JSON string is well-formed, and see the exact line and column of any syntax error.

JSON Beautifier

JSON Beautifier

Reformat JSON with sorted keys and readable indentation for easier reading and diffing.

JSON Tree Viewer

JSON Tree Viewer

Explore a JSON document as an interactive collapsible tree — expand and collapse any node.

XML Formatter

XML Formatter

Pretty-print XML with configurable indentation, preserving attributes, comments, and tag order.

XML Validator

XML Validator

Check XML for well-formedness and report every error with its line and column number.

YAML Formatter

YAML Formatter

Normalize and re-indent YAML, or convert it to JSON, with a configurable indent width.