Multi-Language Code Playground

Write and run small programs in five languages without installing anything: stdin, files, saved snippets, ZIP download and links that carry the code.

Работи във вашия браузър. Файловете ви никога не напускат устройството. Вижте как да го проверите

…

Как се прави

  1. 1
    Choose a language

    Click Python, Ruby, PHP, Lua or C; the template loads.

  2. 2
    Write code

    Edit the code in the editor; Tab inserts spaces.

  3. 3
    Add input

    Put input lines in the stdin tab and data files in the Files tab.

  4. 4
    Run

    Press Run or Ctrl+Enter; the first run downloads the runtime.

  5. 5
    Read output

    Check the console and any new files in the Files tab.

  6. 6
    Share or save

    Use Copy share link, Download source or Download ZIP.

За този инструмент

Online compilers usually send your code to a server, run it in a container and send the output back. This playground runs everything on your own device: each language is a WebAssembly build of its real interpreter that the browser downloads once from jsDelivr and then caches. Python is CPython 3.12 from Pyodide with the scientific packages it offers, Ruby is CRuby 3.4 from ruby.wasm, PHP is PHP 8.4 from php-wasm, Lua is Lua 5.4 through wasmoon, and C runs in the PicoC interpreter compiled to WebAssembly. Programs can read standard input from a box, open text files you add in the Files panel and write files that come back to the panel after the run. Snippets are saved in your browser, and Copy share link packs the language, code, input and files into the link itself, so a classmate can open exactly what you see without any account.

Who this is for

Students doing exercises in several languages, teachers sharing examples, interview candidates practising, and developers who want to try a one-off script on a computer where they cannot install interpreters.

Running code

Pick a language button; each one starts with a template that reads stdin and a CSV file. Press Run or Ctrl+Enter. The first run of a language shows its version, download size, source and licence and then loads it; later runs start at once. Output appears in the console with errors in red and the run time at the end.

Standard input

Type the input your program expects in the stdin tab: Python input(), Ruby gets, PHP fgets(STDIN), Lua io.read and C scanf read from it line by line.

Files

Add text files, upload them, rename, edit, download or delete them. Before each run they are placed in the working directory; after the run new or changed files are read back, so a script can produce a report.txt you can download. PicoC has no file system, so for C only stdin is available.

Saving and sharing

Snippets are saved in local storage with undo. Download source saves the code file, Download ZIP saves code, stdin and files together, and Save file stores the whole workspace. Share links compress the snippet into the part of the address after #, which browsers never send to a server.

Worked example

The Python template reads Ada from stdin and scores.csv with Ada 91, Linus 78 and Grace 96. It prints Hello, Ada!, then 3 players, best: Grace (96), and writes report.txt with Average: 88.3, which appears in the Files tab after the run.

Limits

Programs run on the page's main thread, so an endless loop freezes the tab until it is closed. There is no network access from inside the runtimes, no threads, and only packages built for each runtime (for example pure-Python wheels for Pyodide). PicoC supports most of C89 with common headers but not every library function, and it is an interpreter rather than an optimising compiler. Very long share links may be cut by some chat apps.

Решен пример

Python template: stdin Ada + scores.csv (91, 78, 96) → "Hello, Ada!", "3 players, best: Grace (96)", report.txt with Average: 88.3.

Накратко

Често задавани въпроси

Is my code sent to a server?

No. Only the interpreter files are downloaded from jsDelivr; your code, input and files stay in your browser.

How big are the downloads?

Lua about 0.4 MB, C about 0.8 MB, Ruby about 2 MB compressed, Python about 10 MB and PHP about 13 MB. Each is cached after the first run.

Can I use Python packages?

Imports of packages that Pyodide ships, such as numpy or pandas, are loaded automatically on first use.

How does the share link work?

The snippet is compressed with DEFLATE and encoded after # in the address. Whoever opens it gets a copy in their own browser.

Why does C not see my files?

The PicoC interpreter build has no file system; read data from stdin instead.

What happens with an infinite loop?

The tab stops responding. Close it and reopen the page; your snippet is still saved.

Напълно безплатноБез такса, без регистрация
Файловете остават поверителниВсичко работи във вашия браузър
Лесно на вашия езикНалично на много езици