Free web demo

Code Runner

Write and run Lua, Prolog, Brainfuck and JavaScript right here. Every program runs in an isolated sandbox with a 5 second limit. The offline phone app runs 30+ languages with no internet.

Editor

Run with Ctrl+Enter (Cmd+Enter on Mac). Tab inserts 2 spaces. Keyboard users: press Esc then Tab to leave the editor.

Output

Press Run to see the output here.

Your code runs in your browser and is never uploaded. It is saved on this device only.

A small code editor for languages you do not meet every day

Code Runner lets you write and run a short program in Lua, Prolog, Brainfuck or JavaScript without installing anything. Pick a language, edit the example or paste your own code, and press Run. The output appears next to the editor with the time the program took. Your code is saved on your device for next time and is never uploaded to a server.

Which languages can I run?

How the sandbox keeps you safe

Every run starts a fresh Web Worker, a separate browser thread with no access to the page, your cookies or your files. If a program runs for more than five seconds, for example because of an infinite loop, the worker is stopped and you see a clear message. Output is capped at 200 KB so a runaway print loop cannot freeze the tab. You can also press Stop at any time.

Tips for each language

In Lua, use print and io.write for output and io.read to read lines from the input box. In Prolog, write facts and rules in the editor, then type a query such as main or grandparent(tom, X) in the query box. Brainfuck treats every character except the eight commands as a comment, and the comma command reads one byte from the input box. In JavaScript, errors show the line number so you can find the problem quickly.

Why an offline version?

Compilers and interpreters for less common languages are hard to find on a phone, and most online runners need a connection. The Code Runner phone app bundles the engines so you can practise Lua, Prolog, Scheme, Forth, Haskell, Zig and more on a plane, a train or anywhere without signal. Join the launch list below and tell us which language you want first.

Frequently asked questions

Is Code Runner free?

Yes. This web demo is free, needs no account and has no ads. The planned offline phone app costs $6.99 per language pack or as an all-in-one.

Is my code uploaded anywhere?

No. Programs run inside your browser. Your code and input are saved only in this browser on this device.

Why was my program stopped after 5 seconds?

Programs are limited to five seconds so an infinite loop cannot freeze the page. Press Run again after fixing the loop, or make the work smaller.

Does it work offline?

The web demo needs a connection the first time you pick a language so it can load the engine. The phone app will run fully offline.

Can I read input in my program?

Yes. Use the input box. Lua reads it with io.read, Brainfuck with the comma command and JavaScript with readline.