# wasmdec

> Command-line decompiler that parses a WebAssembly binary or text-format module with Binaryen and emits pseudo-C: globals, imported and defined functions with their locals and control flow, and a preamble of C helpers for WebAssembly operations. Several modules can be decompiled into one file with module-name prefixes, a memdump mode writes the module’s memory and table to files instead, and an Emscripten build of wasmdec powers an online demo. Development stopped at version 1.2.1 in 2018.

- Type: Tool
- Targets: Binary · Website
- Category: WebAssembly tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-20
- Added to the catalog: 2026-11-09
- Original resource: <https://github.com/wwwg/wasmdec>
- Primary source: <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/README.md>
- Catalog page: <https://awesomerea.org/resources/wasmdec/>
- Record JSON: <https://awesomerea.org/resources/wasmdec/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/wasmdec/index.md)

## Requirements & limits

- Source builds need g++ with C++14, Make, CMake and the Binaryen, cxxopts and WebAssembly testsuite submodules; GCC 7 or newer is recommended. The 1.2.1 download is a Linux x86-64 archive.
- Input is a .wasm binary or .wast text module. The asm.js mode needs a compile-time flag that the Makefile does not set; parsing relies on the pinned 2018 Binaryen and may reject newer WebAssembly features.
- Output is pseudo-C. Tests decompile seven bundled fixtures and spec testsuite cases and check exit status.
- The examples include machine-translated code from the commercial game diep.io; rights to that output remain with the original owner.
- The project is MIT; Binaryen, cxxopts and the testsuite submodules retain their own licenses.

## Primary sources

1. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/README.md>
2. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/Makefile>
3. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/.gitmodules>
4. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/src/wasmdec.cc>
5. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/src/decompiler/Decompiler.cc>
6. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/test/tests.sh>
7. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/test/test-spec.sh>
8. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/release/install.sh>
9. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/mkrelease.sh>
10. <https://github.com/wwwg/wasmdec/blob/3d9e5ca66ece79efe8f6550fd03623bd1dea3ec5/LICENSE>
11. <https://github.com/wwwg/wasmdec/releases/tag/1.2.1>
12. <https://github.com/WebAssembly/binaryen/tree/9f49e3d9c92703c3f5cf3589a78a3318bfe2bca4>

## More in Websites

- [JS Deobfuscator (kuizuo)](https://awesomerea.org/resources/kuizuo-js-deobfuscator/index.md) · Tool
- [go-mitmproxy](https://awesomerea.org/resources/go-mitmproxy/index.md) · Tool
- [Dinosaur runner: recovering one acceleration rule](https://awesomerea.org/resources/rea-dinosaur-speed-case/index.md) · Case study
- [rauchg.com: rebuilding an RSC blog from captured Flight output](https://awesomerea.org/resources/rauchg-rsc-reconstruction-case/index.md) · Case study
- [BaoCut Slides: adapting an interactive web editor](https://awesomerea.org/resources/baocut-slides-editor-case/index.md) · Case study
- [REA in Claude Code: an isolated static-analysis A/B trial](https://awesomerea.org/resources/rea-claude-code-isolated-ab-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
