Run Code in 16 Languages on Android — On-Device
PocketCode runs 16 languages and file types on your Android phone, not on a server: 13 come with the app, 3 are optional packs. See what runs and what doesn't.
Most ways to "run code" on a phone quietly send it somewhere else — a cloud runner, a remote sandbox, a website's server. That's fine until the signal drops or you'd rather your code didn't leave your device. PocketCode does the opposite: it executes real languages on the device itself, so running a script is as local as opening a note.
Here's the full picture of what runs, what's ready instantly, what needs a one-time download, and what is not available yet.
Thirteen languages and file types inside the app
These ship inside the APK, so they are there from first launch — nothing to download. You need a free account and a connection to sign in; after that, open a file, tap Run (the button is marked experimental), and your code executes on the device:
| Language | What runs on-device |
|---|---|
| JavaScript | A real bundled Node.js runtime |
| TypeScript | The same bundled Node, which strips the types: there is no type checking and no tsc |
| C | The TCC compiler (0.9.27), which compiles and runs one .c file |
| Python | CPython 3.12 compiled to WebAssembly |
| Ruby | Ruby 3.2 on WebAssembly |
| PHP | PHP 8.2 on WebAssembly, run like the command-line php |
| Java | BeanShell, a Java-style interpreter, experimental and limited: it is not javac, annotation processing is not supported, and classes with objects, inheritance or interfaces, generics, lambdas, enums and printf don't run |
| Kotlin | kotlinc 2.3 on the phone; if the project uses a library the app doesn't bundle, it falls back to a simpler script mode that can fail |
| Shell | Android's own sh, which does not ship most command-line tools: a missing tool ends with exit 127 |
| SQL | Android's SQLite, on a scratch database per file |
| HTML | It doesn't render: it checks the structure and offers Open in DevBrowser |
| Markdown | Opens the preview |
| JSON | Validates the file |
HTML, Markdown and JSON are previews and checks rather than runtimes, but they are what you reach for in the everyday trio of "write a script, build a page, check some data". They work the second you open the app.
Want the deep dive on one of them? We wrote a full guide to
running Python on Android — how the WebAssembly
build executes locally, what the standard library covers, and its honest limits
(no pip, so it's a scripting and learning environment, not a data-science stack).
Three more, one download away
Beyond the included languages, PocketCode offers optional language packs. You download a pack once, from Settings → Compilers and runtimes → Additional language runtimes, and from then on that language runs on the device, just like the built-in ones. The packs you can install today:
- Lua 5.4 (about 0.6 MB). The editor has no Lua highlighting, so
.luafiles open as plain text. - Go (about 38 MB), through the Yaegi interpreter. It is not a full
go build: standard library only, one file at a time, nogo get, no projects withgo.mod. - Rust-style scripts (about 1.4 MB), through Rhai. It is a scripting
language with Rust-like syntax, not
rustc: no advanced traits, lifetimes, async or crates.
Altogether that is 16 languages and file types, through 17 runners (Kotlin has a backup runner), from the same editor on the same phone, without a server in the loop.
What does not run yet
The plugin manager also lists Perl, C++ (Clang), C#, Zig, Dart and Swift, but
none of the six can be installed in this version: the app
doesn't include the checksum it needs to download them. Their files open in the
editor, and Run stays greyed out. Java is not compiled either, and there is no
real Rust (rustc) or full Go toolchain. We don't count any of these as running.
Why "on-device" is the whole point
Running locally isn't a technical footnote — it changes what a phone can be for:
- Your code runs on the device. Once you're signed in, the included languages and any pack you've downloaded execute locally. That matters most where mobile shines: commutes, flights, patchy coverage, emerging-market networks. (The app needs a connection to sign in; opening the app with a session already started works offline.)
- Your code stays yours. Nothing is shipped to a third-party runner to execute. The WebAssembly engines (Python, Ruby, PHP, Lua, Go, Rhai) have no network by default; Run with arguments has an Allow network in WASM engines switch. Node.js, C and the shell are not affected by it.
- There's nothing to assemble. No terminal environment to bootstrap, no toolchain to hand-compile. The runtime is already there; you just press Run.
- It's immediate. There is no remote container to wake up — execution begins on the device.
The editor around it
A runner is only half the story; you also want to write the code well. Every
language opens in the same code editor:
TextMate syntax highlighting for 39 languages, one-tap language servers for 19 of
them (Java, Kotlin, Go, Rust, C, C++ and Ruby are not among them), a built-in
formatter for 24, multi-cursor editing and a programming symbol bar. Output
streams into the Run panel — print/console.log, stack traces, exit codes, and
a stdin box for programs that read input. There is also a
built-in terminal: its shell has node on the
path, but Python, Ruby, PHP, C, Java and Kotlin run from the editor's Run button,
not as shell commands.
What this is, and isn't
Being straight about scope keeps expectations honest:
- Great for scripting, learning a language, algorithm practice, automation, prototyping, and running real code away from a desk.
- Not a full native build farm. Heavy compute runs at interpreter speed, and runtimes that rely on huge native ecosystems (think Python's C-extension packages) stay within what each language ships on-device. Plugins are WebAssembly files only: Google Play doesn't allow downloading native compilers.
Within those lines, it's a pocket-sized multi-language runtime that executes locally.
One phone, 16 languages and file types, executing on the device in your hand.
PocketCode is available on Google Play. Get PocketCode and run your language of choice on your own device.
Frequently asked questions
Can you run code on Android?
Yes. PocketCode runs real programming languages directly on the phone: 16 languages and file types today, 13 of them included in the app and 3 as optional downloads. Open a file, tap Run (it is marked experimental) and the code executes on the device.
What languages can you run on Android?
16 languages and file types run today, through 17 runners. Included in the app: JavaScript (Node.js), TypeScript (types are stripped, not type-checked), Shell, JSON validation, Markdown preview, an HTML check, SQL on SQLite, Python 3.12, Ruby 3.2 and PHP 8.2 (WebAssembly), Java (experimental and limited: a BeanShell interpreter, not javac, and most object-oriented code, generics, lambdas and printf don't run), Kotlin and C (TCC). Optional downloads: Lua 5.4, Go (Yaegi interpreter, standard library only) and Rust-style scripts (Rhai, not rustc). Perl, C++, C#, Zig, Dart and Swift are listed in the plugin manager but cannot be installed yet.
Do you need a computer or a server to run the code?
No. Code executes on the phone itself. You need a connection to sign in; opening the app with a session already started works offline; after that nothing is uploaded to a remote server to run it.
Do you need Termux?
No. The runtimes are built into PocketCode, so there is nothing to install from a package manager or compile by hand.
Can you compile code on a phone?
C, yes: the bundled TCC compiler compiles a .c file and runs it on the device. Kotlin runs with kotlinc on the phone, and falls back to a simpler script mode if the project uses a library the app does not bundle. Java is experimental and limited: BeanShell interprets it instead of javac compiling it, and most object-oriented code, generics, lambdas and printf don't run. C++ cannot be run yet.
Can the code I run open network connections?
Not in the WebAssembly engines (Python, Ruby, PHP, Lua, Go, Rhai): they have no network by default, and you can allow it per run in Run with arguments. Node.js, C and the shell are not affected by that switch.
Does running code need an account or a connection?
You need a free account (email, Google or GitHub) and a connection to sign in. After that, your code runs on the device.
Code Editor