Skip to content
Toolars
Explore

JavaScript Minifier

Minify JavaScript with Terser in a local Worker, with byte statistics and error positions — never executed, never uploaded.

Local processing

Processing details

Tool inputs are processed on your device.

Resources may be downloaded to run this tool. Account services are separate.

Offline resources have not been prepared.

Privacy information
Report bug

Task path / input to outcome

How to minify JavaScript

  1. 01

    Paste the script

    Paste UTF-8 source up to 256 KiB. The indent control is disabled for Minify.

  2. 02

    Try the sample first

    Sample loaded. Run the local transformation when ready.

  3. 03

    Press Minify

    Press Minify. Terser shortens JavaScript text without compression or name mangling; it retains /*!...*/ comments. Run your own tests before shipping.

  4. 04

    Check the statistics

    Compare UTF-8 input and output bytes and the savings percentage. A negative saving means the result grew; inspect it before copying or downloading.

  5. 05

    Copy or download the result

    Use Copy result for the clipboard or Download to save toolars.min.js — Copy result is the fast path when the output is headed straight into a script tag. Reset clears the panes for the next script.

Tool facts

Processing
In your browser
Input leaves this device
Never
Retention
Nothing is stored
Price
Free

Your input stays in the browser.

JavaScript Minifier uses its verified local execution path and does not create a hidden input or output history.

Local execution

Runs inside the current browser tab.

No hidden processing

Active tool data never becomes a Toolars document record.

No account required

Use the core workflow without creating a profile. Favorites sync to your account after you sign in.

Immediate reset

Clear the tab and the active working data is gone.

When JavaScript Minifier is useful

Code reviews

Make source easier to inspect before sharing it with another developer.

Build artifacts

Create compact HTML, CSS, or JavaScript without executing the source.

Copy-ready snippets

Format a focused example and move it directly into documentation or an editor.

What JavaScript Minifier actually does

A standalone JavaScript file needs a smaller release artifact. Paste the built plain JavaScript, minify it locally, compare UTF-8 byte counts, and run project tests on the saved output. Keep readable source in version control.

Common questions

What does the minification actually do?
It removes redundant whitespace and ordinary comments. Compression and identifier mangling are disabled, so it does not optimize expressions or rename bindings.
Is my code executed during minification?
No. Source is parsed inside a local Worker and is never executed, uploaded or saved. Parser acceptance is not application correctness or browser compatibility.
Can I minify TypeScript or JSX here?
No. The parser expects plain JavaScript as ECMAScript 2020, so type annotations and JSX syntax are rejected as errors with their line and column. Transpile to JavaScript first, then minify the emitted code.
Does the workspace produce a source map?
No. The output is the minified code only — what you see in the result pane is the complete artifact, ready to copy or to download as toolars.min.js. If you need debugging maps, generate them in your build pipeline where the original files live.
Why was my script rejected?
Terser expects valid plain JavaScript; TypeScript annotations and JSX must be transpiled first. Correct the syntax and run again. Nothing is executed here.
What are the limits, and is anything uploaded?
Input is limited to 256 KiB and output to 512 KiB. The local Worker has separate five-second startup and run budgets; editing or Cancel stops it. Source stays in this browser; nothing is uploaded.

Related tasks, not a dead end.

Move into another focused workspace without returning to the full index.

URL Workbench

Clean URL lists with signed-link protection and per-line reasons. Compare components and export sitemaps.

Edit

JSON Explorer

Query JSONPath, extract fields and round-trip JSON Pointer records without losing large-number precision.

Inspect

JSON Schema Validator

Validate Draft 7 or 2020-12 locally with exact error paths; infer schemas from multiple observed samples.

Inspect

HTML Publishing

Clean pasted HTML for publishing while preserving lists, links and table semantics; preview changes safely.

Publish