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

LanguageHow it runsBest for
JavaScriptRuns directly on V8Most APIs, routing and edge logic
TypeScriptCompiled to JavaScript before deployLarger codebases and teams
PythonRuns through a Wasm build of PythonScripts and data work
RustCompiled to WebAssemblyCompute heavy work, strict memory safety
C and C++Compiled to WebAssemblyReusing existing native libraries
GoCompiled to WebAssembly, usually with TinyGoPorting 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

TAGS
Coding Interview
System Design Interview
CONTRIBUTOR
Arslan Ahmad
Arslan Ahmad
ex-FAANG engineering manager and author or Grokking series.

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
What is the cache in OS?
What language does Cloudflare workers use?
What is mock interview session?
How to avoid deadlock in Java?
What is the easiest tech position to get into?
What are top algorithms for sorting and searching in interviews?
Related Courses
New
Grokking the AI System Design Interview course cover
Grokking the AI System Design Interview
Learn to design AI systems the way interviewers expect: classic ML products, LLM and RAG architectures, and agentic systems, all through the lens of the system design interview.
4.6
(3,192 learners)
Discounted price for Your Region

$99

Grokking the Coding Interview: Patterns for Coding Questions course cover
Grokking the Coding Interview: Patterns for Coding Questions
The 24 essential patterns behind every coding interview question. Available in Java, Python, JavaScript, C++, C#, and Go. The most comprehensive coding interview course with 543 lessons. A smarter alternative to grinding LeetCode.
4.6
Discounted price for Your Region

$197

Grokking Modern AI Fundamentals course cover
Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
4.1
Discounted price for Your Region

$72

Design Gurus logo
One-Stop Portal For Tech Interviews.
About Us
Our Team
Careers
Partners
Contact Us
Become Affiliate
Copyright © 2026 Design Gurus, LLC. All rights reserved.