Unminify JavaScript Online — Free JS Unminifier

Unminify minified JavaScript instantly with our free online tool. Restore readable formatting from compressed code. All processing happens in your browser — no code sent to any server.

Loading…
JavaScript Unminification
Unminify compressed JavaScript online. Restore readable formatting — instant browser processing, no uploads.

Features

Restore the readability of your minified JavaScript code by adding spaces and line breaks.

Unminify

Restore the readability of your minified JavaScript code by adding spaces and line breaks.

Package used

Terser
v5.47.1

Terser is a modern JavaScript compressor that optimizes the size and performance of your code.

Basic example

Minified JavaScript

function calculateTotal(e){let t=0;for(let o=0;o<e.length;o++)t+=e[o].price;return t}const products=[{name:"Laptop",price:999},{name:"Mouse",price:25}];console.log("Total:",calculateTotal(products));

Formatted JavaScript

function calculateTotal(e) { let t = 0; for (let o = 0; o < e.length; o++) t += e[o].price; return t; } const products = [{ name: "Laptop", price: 999 }, { name: "Mouse", price: 25 }]; console.log("Total:", calculateTotal(products));
JavaScript optimization guide

Minification options

Beautify Options
Indentation options for Beautify and Unminify (not used by Minify)

Indentation Size

Sets the number of spaces or tabs for indentation during Beautify and Unminify

Original code
function test(){return true;}
With 2 spaces
function test() { return true; }
With 4 spaces
function test() { return true; }
Difference
Beautify and Unminify both use the indentation controls in the toolbar. Minify ignores them.

Indentation Type

Use spaces or tabs for indentation during Beautify and Unminify

Original code
function test(){return true;}
With spaces
function test() { return true; }
With tabs
function test() { return true; }
Difference
Spaces are more standard, tabs may be preferred according to your code conventions.

How to Unminify JavaScript Online

JavaScript unminification (also called beautification or formatting) restores readable formatting to compressed code. Paste any minified JavaScript into our tool, and it will add proper indentation, line breaks, and spacing. This is essential for debugging production code, understanding third-party scripts, or reviewing obfuscated libraries. Our tool preserves all functionality while making the code human-readable.

JavaScript Beautifier vs Unminifier — What's the Difference

Both terms refer to making minified code readable, but with subtle differences. A beautifier applies consistent formatting rules (indentation style, brace placement) to any code. An unminifier specifically targets minified code, restoring structure that was stripped during compression. Our tool handles both — paste your code and click Unminify or Beautify depending on your needs.

Concatenating JavaScript Files

Combining multiple JavaScript files into one reduces HTTP requests and can improve page load performance. Use our concatenation feature to merge multiple JS files, then optionally minify the result for maximum compression. This is especially useful for projects that don't use a bundler like Webpack or Rollup.

Frequently Asked Questions — Unminify

Everything about unminification

Can I unminify JavaScript code?

Yes, paste minified JavaScript and click Unminify. Indentation is restored; shortened variable names cannot be recovered.

What is the difference between unminify and beautify?

Unminify targets compressed code. Beautify formats readable source — see our JS beautifier. To compress, use the JS minifier.

Is my code processed securely?

All processing runs locally in your browser — nothing is uploaded.

Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.

Other actions for this language