Wakaru

Quick Start

Decompile your first file with the Wakaru CLI in two minutes.

Edit on GitHub

Wakaru turns production JavaScript back into readable modules. It reverses bundling, transpilation, and minification. No install needed:

# decompile a single file
npx wakaru input.js -o output.js

# unpack a bundle into individual modules
npx wakaru bundle.js --unpack -o out/

Without -o, output goes to stdout. Stdin works too:

cat input.js | npx wakaru > output.js

Install

npm install -g wakaru@latest
wakaru --version

Prebuilt binaries for macOS, Linux, and Windows are on GitHub Releases.

Unpack a bundle

--unpack detects the bundle format automatically and splits the bundle into one file per module. webpack, Rollup/Vite, esbuild, and even Bun single-file executables are supported.

npx wakaru bundle.js --unpack -o out/
npx wakaru dist/ --unpack -o out/     # a whole directory works too

See Unpack a bundle for the full list of supported bundlers.

Pick a rewrite level

--level chooses how far Wakaru rewrites:

LevelUse it for
minimalAuditing, diffing, malware triage. Behavioral fidelity comes first
standard (default)Full helper and syntax recovery under documented assumptions
aggressiveMaximum readability. May alter edge-case behavior
npx wakaru input.js --level minimal -o output.js

See Rewrite levels for what each level may change.

Try it in the browser

The playground runs the same engine in your browser. Turn on Mapping and every output line is colored by the input line it came from:

Playground mapping view: minified input on the left, decompiled output on the right, each output line colored by its source line

See Playground for everything it can do.

Next steps

On this page