WAT to WASM Converter & Formatter — Free Online
Free online WAT/WASM toolkit: compile WAT to wasm, decompile wasm to WAT, format and minify WebAssembly text format. Runs 100% in your browser.
About WAT ⇄ WASM Converter
A toolbox for the WebAssembly Text Format: compile WAT source to a binary .wasm module, decompile an existing .wasm back to readable WAT, and pretty-print or minify WAT. Formatting and compiling run on a pure-JS parser (instant); decompiling uses WABT compiled to WebAssembly. No servers — your code stays on your machine.
How to use WAT ⇄ WASM Converter
- Paste WAT source into the text box, or drop a .wat/.wasm file.
- Use Format or Minify to clean up the text, or Compile to produce a .wasm binary.
- For a .wasm file, the decompiled WAT appears in the output box.
Working with the WebAssembly Text Format
What is WAT?
WAT (WebAssembly Text Format, sometimes .wast) is the human-readable representation of a wasm module — S-expressions like (func (result i32) (i32.const 42)). Tools emit it for debugging, and it's the format you edit by hand when hand-crafting or patching modules.
The binary format (.wasm) is what actually runs; WAT and wasm convert into each other losslessly for valid modules.
What each button does
- Format — parses the WAT and reprints it with canonical indentation. Handy after hand-editing or pasting minified text.
- Minify — collapses whitespace and strips comments for the smallest possible source.
- Compile — assembles the WAT into a .wasm binary you can download and run anywhere.
- Drop a .wasm — decompiles it to WAT with names from the name section applied, so functions read $add instead of $f12.
Supported features
The parser accepts the full spec plus the common post-MVP features: bulk memory, sign extension, multi-value, reference types, SIMD, threads, mutable globals, and exception handling. That covers output from rustc, AssemblyScript, and most other compilers.
Frequently asked questions
Is this WAT tool really free?
Yes — free with no account and no limits.
Is my source code uploaded?
No. Parsing, compiling, and decompiling all happen in your browser; nothing is transmitted.
Can it decompile any .wasm file?
Any valid wasm module can be decompiled to WAT. Note that without a name section, function names are generated ($f0, $f1, …) — compile with debug names if you want readable ones.
Which browsers are supported?
Any modern browser: Chrome, Firefox, Safari, and Edge.
Related tools
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, instantly in your browser.
WebAssemblyCLI / agentCase Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, and kebab-case.
WebAssemblyCLI / agentColor Converter
Convert colors between HEX, RGB, and HSL formats instantly.
WebAssemblyCLI / agentCSS Formatter
Beautify (pretty-print) minified or messy CSS instantly, right in your browser.
runs locallyCSV to JSON Converter
Convert CSV data to a JSON array of objects, using the header row as keys.
WebAssemblyCLI / agentText Encryptor / Decryptor
Encrypt or decrypt any text with a passphrase using AES-256-GCM — keys never leave your browser.
runs locally