FAQ
Common questions about Wakaru.
How is Wakaru different from a formatter or beautifier?
A formatter changes whitespace and layout. Wakaru also recovers modern syntax, removes recognized helpers, and splits bundles into modules. See What is Wakaru for a before-and-after example.
How do I unminify JavaScript?
Run npx wakaru input.js -o output.js, or paste the code into the
playground. See
Unminify a file for output options and name recovery.
How do I decompile a webpack bundle?
Run npx wakaru bundle.js --unpack -o out/. For a build with multiple chunks,
pass them together. Unpack a bundle explains how to
choose the inputs, and Read an unpacked bundle
shows how to find the code you need afterward.
Can I run the recovered code as an application?
It is possible. Start with --level minimal to prioritize preserving the
input's behavior. Wakaru aims to produce working code, but cannot guarantee
that every case will run correctly. You may also need to restore dependencies,
assets, and build configuration. See Rewrite levels.
Can Wakaru extract JavaScript from a Bun single-file executable?
Yes. Run npx wakaru ./compiled-app --unpack -o out/. Wakaru reads the
embedded JavaScript without running the executable. To extract assets too,
see Bun single-file executable.
Can Wakaru deobfuscate JavaScript?
Wakaru focuses on minifier and transpiler output. Deliberately obfuscated code needs a dedicated tool first. See Obfuscated code for how to recognize it and combine tools.
Can it recover original variable names?
When a source map retains the original names, Wakaru can recover them. Without one, some names can be inferred from the code, but most mangled locals stay short. See Source maps for name recovery and extracting original files, or Variable names for other options.
Is the output guaranteed to behave the same?
Not for every input. Wakaru tests semantic preservation, and
rewrite levels let you choose how far recovery goes.
Use minimal when behavioral fidelity matters most. See
Correctness for what the tests measure.
Does it run in the browser?
Yes. The playground processes code locally in your browser. Use the CLI to unpack bundles or work with multiple files. See Playground for the available modes.