# r2dec

> Decompiler plugin for radare2 that turns the disassembly of an analyzed function into pseudo-C through the pdd command. Its decompiler is written in JavaScript, with one module per architecture, compiled to QuickJS bytecode and embedded in a native radare2 core plugin; output can sit beside the assembly or offsets, show only scope blocks, casts or cross-references, render as HTML, or be written back into radare2 as comments. The README lists x86/x64, 16/32/64-bit ARM, MIPS, PowerPC (including VLE), SPARC, AVR, V850 and Dalvik, plus experimental 6502, 8051, BPF, m68k, SuperH, WebAssembly and RISC-V support.

- Type: Tool
- Targets: Binary
- Category: Native analysis tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-19
- Added to the catalog: 2026-10-31
- Original resource: <https://github.com/wargio/r2dec-js>
- Primary source: <https://github.com/wargio/r2dec-js/blob/32ada0dc8bffd1e3ec55d6134531eaae244502ed/README.md>
- Catalog page: <https://awesomerea.org/resources/r2dec/>
- Record JSON: <https://awesomerea.org/resources/r2dec/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/r2dec/index.md)

## Requirements & limits

- Release at review: 6.2.0, published 2026-08-16 from the reviewed master commit, with a Linux amd64 plugin, Windows 32- and 64-bit builds and a source archive that includes dependencies. Release numbers follow radare2's: CI builds against radare2 6.2.0 on Linux and Windows, and the macOS job is commented out. Install through r2pm, or build with meson 0.55.0+ and ninja against the radare2 development files; QuickJS is fetched as a meson subproject.
- Binaries are supplied by the user and the target function must first be analyzed in radare2 (af). Output is readable pseudo-C rather than recovered source; as the README example shows, it can keep register assignments such as eax and generic local names. Regression tests live in the separate r2dec-regression repository, and issue reports use the JSON produced by pddi.
- This repository builds only a radare2 plugin; Rizin's jsdec decompiler is a separate project. Source files carry SPDX headers: BSD-3-Clause for most of the code and MIT for the bundled base64 helper, so GitHub detects no single license.

## Primary sources

1. <https://github.com/wargio/r2dec-js/blob/32ada0dc8bffd1e3ec55d6134531eaae244502ed/README.md>
2. <https://github.com/wargio/r2dec-js/blob/32ada0dc8bffd1e3ec55d6134531eaae244502ed/README.md#L37-L114>
3. <https://github.com/wargio/r2dec-js/blob/32ada0dc8bffd1e3ec55d6134531eaae244502ed/meson.build>
4. <https://github.com/wargio/r2dec-js/blob/32ada0dc8bffd1e3ec55d6134531eaae244502ed/subprojects/libquickjs.wrap>
5. <https://github.com/wargio/r2dec-js/blob/32ada0dc8bffd1e3ec55d6134531eaae244502ed/.github/workflows/ci.yml>
6. <https://github.com/wargio/r2dec-js/blob/32ada0dc8bffd1e3ec55d6134531eaae244502ed/.ci-scripts/ci-tests.sh>
7. <https://github.com/wargio/r2dec-js/tree/32ada0dc8bffd1e3ec55d6134531eaae244502ed/LICENSES>
8. <https://github.com/wargio/r2dec-js/releases/tag/6.2.0>
9. <https://github.com/rizinorg/jsdec/blob/9fc60988ddfe4231971f2cbf5f1064460072c2b3/README.md>

## More in Native binaries

- [Runtime Mobile Security (RMS)](https://awesomerea.org/resources/rms-runtime-mobile-security/index.md) · Tool
- [Pharos](https://awesomerea.org/resources/pharos/index.md) · Tool
- [heimdall-rs](https://awesomerea.org/resources/heimdall-rs/index.md) · Tool
- [PE-bear](https://awesomerea.org/resources/pe-bear/index.md) · Tool
- [PE-sieve](https://awesomerea.org/resources/pe-sieve/index.md) · Tool
- [oletools](https://awesomerea.org/resources/oletools/index.md) · Tool

## 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.
