Utilia

WebAssembly Disassembler

Convert a .wasm binary to readable WAT text, validate it and list its sections, imports, exports and functions, in your browser without running the module.

The module is only read and converted to text: it is never compiled, instantiated or run.

How to convert WASM to WAT

  1. Drop a .wasm file on the drop zone, or click it to choose one (up to 20 MB). You can also press Load an example module to see a small demo.
  2. The tool checks the binary, validates it and shows the result: ✓ The module is valid., or the reason it is not.
  3. Read the counters: Functions (imported and defined), Imports, Exports, Types, Memories, Tables and Globals.
  4. Read the disassembly in WebAssembly text format (WAT), then Copy it or press Download .wat.
  5. Adjust the output with the options: Use names from the name section, Folded expressions (S-expressions) and Inline exports.
  6. Open the Sections, Imports and Exports tables for the layout of the file: each section with its byte offset, size and number of entries.

The module is never compiled, instantiated or run. The tool only reads its bytes and turns them into text, so it is safe to inspect a file you don’t trust.

What the WAT output shows

WebAssembly has two equivalent formats: the compact binary .wasm that browsers and runtimes load, and the text format .wat, which is meant for humans. The disassembler prints every part of the module in text form: function types, imports, function bodies, tables, memories, globals, exports, the start function, element segments and data segments.

By default, instructions are listed one per line in stack order, the way they are stored:

(func $add (param $a i32) (param $b i32) (result i32)
  local.get $a
  local.get $b
  i32.add)

With Folded expressions (S-expressions), operands are nested inside the instruction that uses them, as in (i32.add (local.get $a) (local.get $b)), which is often easier to follow. Inline exports writes (export "add") inside the function instead of in a separate list.

Names, debug information and validation

A .wasm file refers to everything by index. When the compiler kept a name custom section (common in debug builds), Use names from the name section shows the original names such as $factorial. Otherwise wabt generates names such as $f2 or $t0 so the text stays readable. Production builds are often stripped of names, so a minified module will show generated names only.

Validation follows the WebAssembly specification: types must match on the operand stack, indexes must exist, and so on. An invalid module is still disassembled when its structure can be read, with the validation error next to it, which helps when you debug a compiler or a hand-written binary. Post-MVP features such as SIMD, threads, bulk memory, reference types, multi-value, tail calls, exception handling, memory64 and garbage collection are enabled for reading.

This tool uses wabt.js, the JavaScript build of the WebAssembly Binary Toolkit (wasm2wat). It is loaded only when you open a file.

Frequently asked questions

Can I get the original C, C++ or Rust source back?

No. WAT is a readable form of the compiled binary, not a decompiler: the source code, comments and most type information are gone after compilation. Function names only survive when the name section was kept.

Is my file uploaded?

No. The file is read and disassembled in your browser; nothing is sent to a server.

Why does the tool say the file is not a WebAssembly binary?

Every module starts with the four bytes \0asm followed by version 1. A file served with a different content, compressed with gzip or Brotli, or a WebAssembly component (the newer component model) will be rejected.

Why is the text box cut off?

Very large modules can produce millions of lines. The text box shows the first part to keep the page responsive; Download .wat saves the complete text.

Can I run or test the module here?

No. The module is intentionally never instantiated, so its code can’t run in the page. To test it, load it in your own project or a runtime such as wasmtime or Node.js.