WebAssembly (WASM) Obfuscator – Online
Two tools in one. Paste WebAssembly Text format (.wat) to rename functions, locals, and encode strings. Or upload a .wasm binary to strip its name and debug sections. Everything runs in your browser — no uploads.
WAT mode (text): full source-level obfuscation — identifiers renamed, strings XOR-encoded with a matching runtime decoder, numbers transformed. Best for protecting WAT files you distribute or for pre-compilation obfuscation. WASM mode (binary): strips name, debug, and custom sections from compiled .wasm binaries. Cannot transform code logic — that requires native tools like wasm-mutate.
.wasm with wat2wasm (from WABT) or an online WAT-to-WASM converter. The tool preserves export names so your module's public API stays stable.
Drop your .wasm file here
or click to browse · strips name, debug, and custom sections
.wasm file never leaves this browser tab. All parsing happens in JavaScript.
WebAssembly ships in two forms: .wat (WebAssembly Text format — human-readable assembly) and .wasm (binary format — what browsers execute). This tool handles both: full source-level obfuscation for WAT, and metadata stripping for compiled WASM binaries.
WAT vs WASM — What's the Difference?
| Format | Readable? | What This Tool Does |
|---|---|---|
.wat (text) | Yes — assembly-like syntax | Full obfuscation: rename identifiers, encode strings, obfuscate numbers |
.wasm (binary) | No — compiled bytecode | Strip: remove name, debug, and custom sections |
WAT Obfuscation — What Actually Happens
WAT is a text format, so we can apply the same techniques used in JavaScript or Lua obfuscation:
- Identifier renaming:
$calculate_score→$a. Function names, parameter names, local names, and label names are all renamed. References throughout the module are updated. - String encoding: Data section strings are XOR-encoded and a decoder function is injected into the module. At runtime, the decoder reconstructs the original strings.
- Numeric obfuscation (optional): Constants like
10are replaced with equivalent expressions like(7 3 i32.add). - Comment removal:
;;line comments and(; ;)block comments are stripped.
(export "greet"), the export string stays intact. External callers expect that name. Only internal identifiers are renamed.WASM Strip — What It Removes
The binary format supports optional custom sections that can be removed without affecting execution:
| Section | Contains |
|---|---|
name | Function names, local names, module name |
.debug_* | DWARF debug info (line tables, type info) |
sourceMappingURL | URL to original source map |
producers | Compiler name and version |
wasm-mutate locally.Recommended Workflow
- If you write WAT directly: Obfuscate it here, then convert with
wat2wasmto produce a stripped compiled binary with obfuscated identifiers. - If you have a compiled .wasm: Run it through the strip tool to remove metadata. For deeper protection, keep the source WAT, obfuscate it here, and recompile with
wat2wasm. - Test the result: Load the obfuscated module in a browser with
WebAssembly.instantiate()and verify exports work as expected.
Frequently Asked Questions
Does WAT obfuscation affect execution?
Is my file uploaded to your server?
How do I convert obfuscated WAT back to .wasm?
wat2wasm from the WABT toolkit: wat2wasm obfuscated.wat -o output.wasm. There are also online WAT-to-WASM converters.