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.

🔒 Runs entirely in your browser — your files never leave your device.

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

  1. Paste WAT source into the text box, or drop a .wat/.wasm file.
  2. Use Format or Minify to clean up the text, or Compile to produce a .wasm binary.
  3. 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