Minify JavaScript with Terser (compression and variable-name mangling) or beautify minified code back into readable, indented source. Syntax errors are reported instead of producing broken output, and nothing is uploaded.
Input JavaScript
// Fetch users and group them by role
async function loadUsers(url) {
const response = await fetch(url);
if (!response.ok) { throw new Error("Request failed: " + response.status); }
const users = await response.json();
return users.filter((user) => user.active);
}Beautified
// Fetch users and group them by role
async function loadUsers(url) {
const response = await fetch(url);
if (!response.ok) {
throw new Error("Request failed: " + response.status);
}
const users = await response.json();
return users.filter((user) => user.active);
}Same input
// Fetch users and group them by role
async function loadUsers(url) {
const response = await fetch(url);
if (!response.ok) { throw new Error("Request failed: " + response.status); }
const users = await response.json();
return users.filter((user) => user.active);
}Minified
async function loadUsers(t){const a=await fetch(t);if(!a.ok)throw new Error("Request failed: "+a.status);return(await a.json()).filter(t=>t.active)}Minify CSS and HTML, test patterns with the regex tester, or escape strings with JSON Escape.
Paste your code and choose Minify. It is compressed and variable names are shortened using Terser, the same minifier used by many build tools, so the output is as small as possible.
Yes. Choose Beautify to turn minified or hard-to-read code into consistently indented, readable JavaScript. Mangled variable names can't be restored, only the formatting.
Terser supports modern ES syntax including async/await, classes, optional chaining and modules. If your code has a syntax error, the tool shows the error instead of output. Everything runs in your browser — your code is never uploaded to a server.