BYTETOOLS

Wandbox API

Query Wandbox for every compiler it hosts, with versions and switch definitions, then compile code over HTTP. No API key. Verified response and field guide.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the Wandbox API?

Wandbox is a free online compiler with an open HTTP API. `GET https://wandbox.org/api/list.json` returns every hosted compiler with its language, version and available option switches, and `POST /api/compile.json` compiles and runs a snippet. Neither call requires an API key.

Wandbox has hosted an unusually deep compiler farm since 2013, including bleeding-edge HEAD builds of GCC and Clang that are rebuilt continuously. That makes `list.json` valuable on its own: it is a machine-readable inventory of which compiler versions actually exist right now, complete with the exact flag strings each one accepts.

The structure of a compiler entry is the part worth studying. Each `switches` element is either a `single` toggle with a `display-flags` string, or a `select` containing an `options` array of mutually exclusive choices such as language standards. If you are building a UI on top, you can render the entire options panel straight from this document without hard-coding a single compiler flag, which is exactly how Wandbox's own front end works.

Quick facts

Base URL
https://wandbox.org/api
Authentication
No key or account for either endpoint. Compilation runs in a sandbox with strict CPU and memory limits.
Rate limit
Not published. Compilation is expensive for the operator, so do not use it as a general-purpose execution backend for a busy product.
Pricing
Free and open source.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the Wandbox API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. List every compiler Wandbox hosts

GET https://wandbox.org/api/list.json

curl
curl 'https://wandbox.org/api/list.json'
JavaScript (fetch)
const res = await fetch("https://wandbox.org/api/list.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://wandbox.org/api/list.json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
[
  {
    "name": "gcc-head-c",
    "version": "17.0.0 20260806 (experimental)",
    "language": "C",
    "display-name": "gcc HEAD",
    "templates": [
      "gcc-c"
    ],
    "compiler-option-raw": true,
    "runtime-option-raw": false,
    "display-compile-command": "gcc prog.c",
    "switches": [
      {
        "type": "single",
        "name": "warning",
        "display-name": "Warnings",
        "display-flags": "-Wall -Wextra",
        "default": true
      },
      {
        "type": "single",
        "name": "optimize",
        "display-name": "Optimization",
        "display-flags": "-O2 -march=native",
        "default": false
      },
      {
        "type": "single",
        "name": "cpp-verbose",
        "display-name": "Verbose",
        "display-flags": "-v",
        "default": false
      },
      {
        "type": "select",
        "name": "std-c",
        "options": [
          {
            "name": "std-c-default",
            "display-flags": "",
            "display-name": "Compiler Default"
          },
          {
            "name": "c89",
            "display-flags": "-std=c89",
            "display-name": "C89"
          },
          {
            "name": "gnu89",
            "display-flags": "-std=gnu89",
            "display-name": "C89(GNU)"
          },
          {
            "name": "c99",
            "display-flags": "-std=c99",
            "display-name": "C99"
          },
          {
            "name": "gnu99",
            "display-flags": "-std=gnu99",
            "display-name": "C99(GNU)"
          },
          {
            "name"

Parameters

ParameterTypeRequiredDescription
(list.json)n/aOptionalThe listing endpoint takes no parameters. /api/list.json
compilerstringOptionalFor `POST /api/compile.json`: the compiler `name` from the listing, such as `gcc-head-c`. gcc-head-c
codestringOptionalFor `POST /api/compile.json`: the source to compile, as a JSON string. int main(){}
optionsstringOptionalComma-separated switch names selected from that compiler's `switches` array. warning,c99
compiler-option-rawstringOptionalRaw extra flags, newline-separated. Only accepted when the compiler advertises `compiler-option-raw: true`. -O3
stdinstringOptionalStandard input to feed the compiled program. 42

Response fields

(root)array
One object per compiler. The same language appears many times, once per version, so group by `language` before rendering a picker.
namestring
The compiler identifier you pass back in a compile request. This is the key, not `display-name`.
versionstring
Exact version string. HEAD builds carry a dated experimental version such as `17.0.0 20260806 (experimental)`.
languagestring
Human-facing language name, for example `C` or `C++`. Useful for grouping, not as an identifier.
compiler-option-raw / runtime-option-rawboolean
Whether that compiler accepts free-form compile-time and run-time flags. Sending raw options to a compiler that reports `false` is ignored.
switchesarray
Option definitions. Elements of `type: single` are toggles with `display-flags`; elements of `type: select` carry an `options` array of exclusive choices such as language standards.
templatesarray
Names of starter templates associated with the compiler, used by the Wandbox web UI.

What you can build with the Wandbox API

  • Build a compiler picker whose flags and standards come from live data rather than a hard-coded list
  • Check which GCC or Clang versions are currently available before scripting a compatibility matrix
  • Run small reproductions of a bug across several compiler versions from one script
  • Power a documentation site's 'run this example' button for compiled languages
  • Teach a language without asking students to install a toolchain

Common errors and how to fix them

400 on compile

The `compiler` name does not match any entry in `list.json`, or an option name is not in that compiler's `switches`.

Fix: Always resolve names from a fresh `list.json`; compiler ids change as versions are added and retired.

Compilation succeeds but nothing runs

You compiled a language with no main entry point, or the program wrote to stderr only.

Fix: Read `program_message` and `compiler_message` separately in the response rather than only checking the status.

Timeout

The sandbox enforces a wall-clock limit and killed the process.

Fix: Keep snippets small; Wandbox is not a batch execution service.

Wandbox API — frequently asked questions

Is the Wandbox API free?

Yes, with no key or account. It is a volunteer-run service, so treat compilation as a courtesy and cache the compiler list rather than fetching it on every page load.

How many languages does Wandbox support?

Well over forty, including C, C++, Rust, Go, Python, Ruby, Haskell, OCaml and several esoteric languages, usually with multiple versions of each. `list.json` is the authoritative count at any moment.

Can I run untrusted user code through it?

Wandbox sandboxes execution, but you would be sending your users' code to a third party and depending on someone else's capacity. For anything production-facing, self-host or use a service designed for that load.

What is the difference between name and display-name?

`name` is the stable identifier you send when compiling. `display-name` is for humans and collapses several versions into one label, so it is not unique.

Tools that pair with this API

Wandbox is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.