Cloudflare Workers Supported Languages: What You Can Write a Worker In
Cloudflare Workers run JavaScript on V8, the same engine that powers Chrome. Every other language either compiles to JavaScript or compiles to WebAssembly. WebAssembly, often shortened to Wasm, is a portable binary format that V8 can also run.
So the honest answer to "which languages does it support" has two layers. JavaScript is native. Everything else is a path onto that runtime.
The Supported Languages
| Language | How it runs | Best for |
|---|---|---|
| JavaScript | Runs directly on V8 | Most APIs, routing and edge logic |
| TypeScript | Compiled to JavaScript before deploy | Larger codebases and teams |
| Python | Runs through a Wasm build of Python | Scripts and data work |
| Rust | Compiled to WebAssembly | Compute heavy work, strict memory safety |
| C and C++ | Compiled to WebAssembly | Reusing existing native libraries |
| Go | Compiled to WebAssembly, usually with TinyGo | Porting small Go services |
Cloudflare treats JavaScript, TypeScript, Python and Rust as first-class choices. Python Workers are documented as a beta feature, so check the current status before you ship one.
Why JavaScript and TypeScript Fit Most Projects
Pick JavaScript unless you have a reason not to. It starts fastest, has the most examples, and needs no build step.
TypeScript is the better default for a team. It is JavaScript with type checking added, and it compiles to plain JavaScript. Cloudflare publishes type definitions for the Workers runtime, so your editor knows the platform APIs.
One point often missed: Workers are not Node.js. The runtime follows web standards such as fetch, Request and Response. Some Node.js APIs are available behind a compatibility flag, but not all of them.
When Rust or WebAssembly Is Worth It
Choose Rust when the work is heavy on computation. Image resizing, parsing, cryptography and compression all fit.
Rust code compiles to WebAssembly and runs beside your JavaScript. Cloudflare maintains a Rust library for Workers so you can write handlers in Rust directly.
There is a cost. Wasm modules are larger than a small script. They also add a boundary, because passing data between JavaScript and Wasm means copying bytes. For a simple API route, that cost is not worth paying.
C, C++, Go, Kotlin and several others reach Workers the same way. If a compiler can produce WebAssembly, the code can run. Tooling quality varies, so test early.
When Python Fits
Python Workers let you write a handler in Python and deploy it like any other Worker. The runtime is a Wasm build of Python, and Cloudflare bundles a set of packages with it.
Use it when the logic is easier to express in Python than in JavaScript. Keep it away from your lowest latency routes while the feature is in beta.
The Limits That Decide Your Choice
The runtime shapes the answer more than the language does.
- Each Worker gets 128 MB of memory.
- CPU time per request is capped, and the cap depends on your plan.
- There is no local disk, so state lives in KV, R2, D1, Durable Objects or an outside service.
- Startup time counts, so a smaller bundle answers faster.
A language that produces a large binary will feel these limits first. That is the real reason JavaScript stays the common choice.
How to Prepare
- Start in TypeScript. It gives you types with no runtime cost. See also what language Cloudflare Workers use for a shorter version of this answer.
- Measure before you move to Rust. Add timing to the slow route first. Move only the hot function, not the whole Worker.
- Learn the storage options with the language. Picking KV against D1 against Durable Objects matters more than picking Rust against JavaScript.
- Expect edge questions in the interview loop. Cloudflare asks about caching, latency and failure handling at the edge. Grokking the System Design Interview covers those patterns, and Grokking System Design Fundamentals covers the basics under them.
- Practice in one language for the coding round. The Cloudflare live coding interview is usually run in a shared editor, so fluency beats breadth.
- Read the full loop before you apply. The stages of the Cloudflare interview lists what each round covers.

GET YOUR FREE
Coding Questions Catalog

$99

$197

$72