script.js — 2 tools ● LIVE
Input · raw script 0 CHARS
NETWORK PAYLOAD: 0 BYTES · PROCESSING: LOCAL
Output · processed 0 CHARS
READ-ONLY · UPDATES ON EVERY KEYSTROKE
Characters in0RAW SCRIPT
Characters out0PRETTY-PRINTED
Indent2 SPSET IN THE DECK
Lines out0STATEMENTS BREATHE

Developer Tools · Group 05 of 19

JavaScript Tools.

One tokenizer, two machines. The beautifier re-indents your script with a real lexer — strings, template literals, regexes and comments tracked character by character — and it never joins two lines, so semicolon insertion can never change your program's meaning. The minifier squeezes the same tokens toward a single line, keeps a space only where re-lexing could bite, and reports exact byte savings. Nothing is uploaded, nothing is stored.

  • Tools02
  • Tokenizerlive
  • Uploads0
  • Backendnone
  • Costfree
In order, 01 → 02

Two machines, one tokenizer, zero servers.

( 01 )

Feeds your script through a real tokenizer — template literals with nested ${} interpolation, regex literals, strings and comments are all tracked, none of them can confuse the indenter — then reflows it with taste: one statement per line, blocks indented one level deep, } else { and }); kept tight, for(;;) headers left on a single line, and your own blank lines preserved between functions. The safety guarantee is structural: the beautifier never joins two lines, it only adds breaks after semicolons, after opening braces and before closing braces — so automatic semicolon insertion behaves exactly as you wrote it. Choose 2-space, 4-space or tab indentation from the deck, and hit ↯ Mangled sample to watch a one-line disaster become readable code.

Example

const go=async()=>{let r=await fetch("/api");if(!r.ok){throw new Error("no")};return r.json()};

const go = async () => { let r = await fetch("/api"); if (!r.ok) { throw new Error("no"); } return r.json(); };

Use it for legacy bundlescode reviewde-obfuscationlearning

Runs the same token stream through the compactor: comments stripped, whitespace gone, and a space kept only where removing it would re-lex the code — between two words, before a regex that follows a keyword (return /re/), and between sign collisions (a + ++b stays a + ++b, never a+++b). An ASI guard preserves your line break wherever joining two tokens could change what the parser sees. The stat strip reports bytes in, bytes out, bytes saved and the reduction percentage — real bytes, not character estimates. Flip ⚡ aggressive and it also drops semicolons that sit directly before a closing brace and collapses stray empty statements.

Example

// glow function pulse(el) { el.style.opacity = 0.5; return el.hidden ? 0 : 1; }

function pulse(el){el.style.opacity=0.5;return el.hidden?0:1} comment gone · whitespace gone · spaces kept only where the lexer needs them.

Use it for production bundlesinline scriptsembedspage-speed budgets

Tokenizer rules · both tools share one tokenizer — strings, template literals (with nested ${} interpolation), regex literals and comments are tracked character by character · regex vs division is decided by the previous-token heuristic: after a value (identifier, number, string, ), ], }) a slash divides; anywhere else it opens a regex · the beautifier never joins two lines, so automatic semicolon insertion can never change your program's meaning — it only adds breaks after ;, after { and before }, keeps } else { and }); tight, and leaves for(;;) headers on one line · the minifier keeps a space only where re-lexing could occur (return /re/, a + ++b, word word) and preserves author newlines at ASI boundaries · aggressive mode drops semicolons before } and collapses empty statements — nothing else · JSX and TypeScript-only syntax are out of scope · ⇄ Output → Input feeds any result straight back for another pass

The privacy promise

Paste anything. We couldn't read it even if we wanted to.

This page has no backend and no database. Every token re-indented, every comment stripped and every byte counted just now was computed by JavaScript inside your own browser tab — your script never traveled a single centimeter of cable. Close the page and it's gone for good.

✕ SERVER · DATABASE · LOGS · ANALYTICS
  • Databasenull
  • Backendnone
  • Script uploads0
  • Session logs0
Questions

Asked often, answered plainly.

( 02 )
Is this a full JavaScript parser?

It's a tokenizer plus a structural reflow — one level below a full AST. It handles modern syntax confidently: template literals with nested ${} interpolation, arrow functions, async/await, optional chaining, regex literals, classes, spread and destructuring. JSX and TypeScript-only syntax are out of scope — for those, run the plain JavaScript parts through the bench first.

Can the beautifier change my program's meaning?

No, and it's guaranteed by construction: the beautifier never joins two lines, so automatic semicolon insertion can never fire differently than in your source. It only adds safe line breaks — after semicolons, after opening braces, before closing braces — and re-indents. Every token, string, template literal, comment and regex passes through byte-for-byte.

How does the minifier tell a regex from division?

With the same previous-token heuristic production minifiers use: after a value — an identifier, number, string, ), ] or } — a slash is division; anywhere else it opens a regex literal, so return /re/ keeps its space while (a) / b doesn't need one. On top of that, an ASI guard keeps an author's line break whenever joining two tokens would re-lex them into something else, like a call or a postfix increment.

What does aggressive mode do?

It drops semicolons that sit directly before a closing brace and collapses empty statements — stray ;; runs — both perfectly legal under JavaScript's semicolon rules, and both guarded so a for(;;) header is never touched. It never rewrites values, identifiers or booleans; the savings are structural, not semantic.

Is my code saved anywhere?

No. IrisTool has no backend and no database. Tokenizing happens inside your browser tab and the script disappears the moment you close or refresh the page. There is nothing to leak, because nothing is ever collected.