Language sandbox
Write and run code in 29 languages — JavaScript, TypeScript, Python, Java, Kotlin, C, C++, Rust, Go, R, PHP, Perl, Ruby, Lua, OCaml, Fortran, Clojure, Scheme, Prolog, BQN, Forth, BASIC, SQLite, DuckDB, HTML, p5.js, GLSL, Brainfuck and Befunge — and share it as a link.
Added · updated 30 October 2026
Works with
- Java class file and JAR inspector Formatting and referenceJava's Bytecode button opens the classes javac just compiled there
How to use it
Pick a language, edit, and press Run (or Cmd/Ctrl + Enter). Stop (or Escape) ends a program that will not finish. Your code is remembered separately for each language in this browser.
⛶ Full screen (or F outside the editor) gives the editor and its output the whole screen, side by
side on a wide one — the browser’s full screen where it is allowed, otherwise a full-window layer
(iPhone). On a phone the language picker starts hidden; ◫ Panels shows it. Escape leaves.
Where each language runs
| Language | Runtime |
|---|---|
JavaScript |
Your browser’s engine, in a Web Worker. |
TypeScript |
The real |
Java |
The real |
Kotlin |
Sent to JetBrains' Kotlin Playground service (api.kotlinlang.org, the latest stable Kotlin) to compile and run on the JVM. There is no Kotlin compiler that runs well inside a browser page, so this one goes over the network. |
Python |
Pyodide (CPython compiled to WebAssembly, ~10 MB). Imports such as |
C, C++ |
YoWASP Clang — the real Clang/LLVM compiler as WebAssembly (~50 MB on first use). Programs are built for |
Lua |
Lua 5.4 via wasmoon. |
Ruby |
CRuby 3.4 via ruby.wasm (~8 MB), with the standard library. |
SQLite |
sql.js. One database for the page: tables persist between runs until Stop. |
DuckDB |
duckdb-wasm (~35 MB). Load file… turns a CSV, Parquet, or JSON file on your computer into a table, read locally. |
Prolog |
SWI-Prolog as WebAssembly. Lines starting |
Scheme |
|
BASIC |
A classic line-numbered BASIC written for this site (PRINT, INPUT, GOSUB, FOR/NEXT, DATA…). |
Rust |
Sent to play.rust-lang.org to compile and run. |
Go |
Sent to go.dev/play to compile and run. |
R |
webR (~20 MB on first use). Each top-level value prints as at the R console; base-graphics plots ( |
PHP |
PHP 8.4 via php-wasm (~12 MB), a fresh interpreter for each run. The opening |
Perl |
Perl 5 with its core modules via zeroperl (~25 MB). |
OCaml |
The OCaml 5 toplevel compiled with js_of_ocaml (~5 MB). Use stdin for |
Fortran |
LFortran compiled to WebAssembly (~18 MB). Use stdin for |
Clojure |
Scittle, the Small Clojure Interpreter (ClojureScript semantics, so numbers are JavaScript doubles). The value of the last form is shown after |
BQN |
The BQN reference implementation in JavaScript. The last value is printed; |
Forth |
A small ANS-style Forth written for this site; whatever is left on the stack is shown at the end. |
Brainfuck, Befunge |
Interpreters written for this site: Brainfuck on a 30 000-byte tape, Befunge-93 on its 80 × 25 grid. stdin feeds |
p5.js |
A p5.js sketch ( |
GLSL |
A fragment shader drawn with WebGL, with |
HTML |
Rendered in a sandboxed frame. |
Runtimes download from the jsDelivr CDN the first time you use them and are then cached by your browser (CheerpJ’s runtime comes from Leaning Technologies' own CDN, cjrtnc.leaningtech.com). Only Rust, Go and Kotlin send your code anywhere — to their official playgrounds, when you press Run.
For a guided tour of a language — a page of runnable examples showing what makes it distinctive — see the playgrounds in the Lab.
After a Java compile, Bytecode ↗ opens the class files javac wrote (nested and anonymous classes included) in the class file inspector, which shows them the way javap -v does.
Sharing
Share link copies a URL that opens this tool exactly as you have it. Hand-written links work too: ?lang=lua&code=… (any language id from the picker). Nothing runs until you press Run. Older #lang:… links still open. For example ?lang=python&code=print(sum(range(10))).
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser — network requests go only to the services named on this page.