← learn
Go

Go in your browser

A Go interpreter (Yaegi) compiled to WebAssembly, running Go 1.22-era programs — nothing leaves the page.

Runtime

The first Run downloads the Go interpreter, in two parts, into a sandbox on a separate origin. Later visits load it from your browser's cache.

Not loaded yet — press Run to download the Go interpreter.
Downloaded
—
Go version
—
Interpreter
Yaegi v0.16.1, built from source

Go scratchpad

Write a Go program (package main with a main function) and run it. A program that loops forever or deadlocks keeps waiting here — Stop ends it by shutting down its worker.

This is an interpreter, not the Go compiler: programs run slower than compiled Go, and a few things are missing — the min and max built-ins, generic standard-library functions such as slices.Sort, and type inference for functions with two type parameters (write Map[int, string](…)).

Output will appear here.

Experiments

Ready-made Go programs that show off the language. Each runs exactly like the scratchpad.

Pick an experiment.

Runtime probes

Ask Go what it can see from inside the browser sandbox.

Probe results will appear here.