Chris Collins

Tools · dev

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

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 tsc (TypeScript 6.0.3, the last version of the compiler written in TypeScript; 7.x is native Go) runs in a worker and type-checks with --strict against the ESNext and DOM libraries. Its errors are printed exactly as tsc --pretty false prints them, then the emitted JavaScript runs as an ES module in a second worker, so top-level await and import … from 'https://cdn.jsdelivr.net/npm/…/+esm' work (URL imports are typed as any, since their types are not fetched). Like tsc, it runs even when there are type errors; press noEmitOnError to stop that, JS to see the emitted code. About 4 MB compressed on first use.

Java

The real javac and a JDK 25 JVM, running in the page as WebAssembly under CheerpJ by Leaning Technologies (free for personal use under its Community Licence). The source is saved under the name of its public class, compiled, and the class with main is run; a compact source file (just void main() { … }, Java 25) works too. Type into stdin first, or leave it empty and the program asks when it reads System.in. The first run downloads the runtime (tens of MB) and takes several seconds; later compiles take about a second. A loop that never prints or sleeps keeps the JVM busy and the tab unresponsive until it ends — CheerpJ runs Java on the page’s own thread, so Stop only works while the program yields; close the tab if one runs away.

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 numpy or pandas load automatically; add # pip: package for pure-Python packages from PyPI.

C, C++

YoWASP Clang — the real Clang/LLVM compiler as WebAssembly (~50 MB on first use). Programs are built for wasm32-wasi and run in a worker; use stdin to give them input.

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 ?- are queries.

Scheme

BiwaScheme.

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 (plot(), hist()…) appear as images below the output.

PHP

PHP 8.4 via php-wasm (~12 MB), a fresh interpreter for each run. The opening <?php is optional.

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 read_line; a program that prints nothing shows the toplevel’s val x : int = … for each definition.

Fortran

LFortran compiled to WebAssembly (~18 MB). Use stdin for read *.

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; •Show prints along the way.

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 , (Brainfuck) and & ~ (Befunge).

p5.js

A p5.js sketch (setup() and draw()) in a sandboxed frame; console.log appears below it.

GLSL

A fragment shader drawn with WebGL, with u_time, u_resolution and u_mouse (or Shadertoy’s mainImage with iTime, iResolution, iMouse). Compile errors point at your own line numbers; Stop ends the animation.

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

Runs entirely in your browser — network requests go only to the services named on this page.