Beginner's Guide to Cloudflare Workers: Getting Started in 2026

Beginner's Guide to Cloudflare Workers: Getting Started in 2026

Serverless / Edge Compute🛠 Cloudflare Workers

Cloudflare Workers free tier, explained: deploy serverless APIs, cron jobs, and full backends at zero cost with no credit card. Real limits, docs-verified.

free-tierserverlessedge-computecloudflarejamstack

Beginner’s Guide to Cloudflare Workers 2026

If you have ever wondered how to deploy a serverless function for free with Cloudflare Workers, this guide answers it with real numbers: the exact free-tier limits, a step-by-step first deployment, the gotchas that trip up beginners, and an honest verdict on whether the $0 plan is enough for a side project. Cloudflare Workers is the compute layer in the free stack for indie hackers, pairing seamlessly with Pages for the frontend, R2 for files, and D1 for data.

Verdict

StacksFree Verdict: 9 / 10. Cloudflare Workers offers the most generous serverless free tier we cover, granting 100,000 requests per day with no credit card and zero egress charges—a rare combination. It’s docked points for the 10 ms CPU time cap per invocation, 3-day log retention, and because advanced features like Vectorize and Containers require a paid plan. For running API endpoints, cron jobs, or a full backend with D1, KV, and AI bindings at $0, it’s a powerhouse for indie hackers.

How This Guide Was Built

This guide is based on the official Cloudflare documentation, specifically the Workers limits page and the Workers pricing page, both fetched and verified on August 17, 2026. We did not run the tool hands-on; every limit, command, and error code below comes from Cloudflare’s published documentation rather than our own testing. Last verified: August 2026. All facts trace to these official sources, ensuring accuracy for your projects.

What is Cloudflare Workers?

Cloudflare Workers is a serverless execution environment that allows you to deploy and run code at the edge on Cloudflare’s network of over 300 cities. It supports JavaScript, Python, Rust, and WebAssembly, providing low-latency execution for functions close to your users. This makes it the compute layer for building full-stack applications for free, distinct from static site hosting. You can bind it to other free-tier services like D1 (database), KV (key-value store), R2 (object storage), and Workers AI to create robust, serverless backends without managing infrastructure.

How do I deploy a serverless function for free with Cloudflare Workers?

You deploy a serverless function for free with Cloudflare Workers by creating a free account, scaffolding a project with the C3 CLI, testing it locally with Wrangler, and pushing it live to a *.workers.dev URL — no credit card required. Follow these seven steps to get your first function running.

  1. Sign up for a free Cloudflare account at dash.cloudflare.com (Workers & Pages signup) — no credit card required; you’re automatically on the Workers Free plan — get-started guide.
  2. Install Node.js 16.17.0+ (required by the Wrangler CLI; any recent LTS works).
  3. Scaffold a project with C3: npm create cloudflare@latest -- my-first-worker — choose “Hello World example” → “Worker only” → JavaScript (Python is also available).
  4. Develop locally: cd my-first-worker && npx wrangler dev — browser login on first run; preview at http://localhost:8787.
  5. Write code: edit src/index.js. Include this exact minimal handler (the C3 hello-world default):
    export default {
      async fetch(request, env, ctx) {
        return new Response("Hello from Cloudflare Workers!");
      },
    };
    (For scheduled tasks, add a scheduled() handler alongside the fetch function.)
  6. Deploy: npx wrangler deploy — live at <worker>.<your-subdomain>.workers.dev; the first deploy prompts you to pick a subdomain; transient 523 errors right after the first push are normal — wait a minute and refresh.
  7. Extend: add bindings (KV, D1, R2, AI) in wrangler.jsonc or the dashboard; attach a custom domain; add Cron Triggers in the dashboard (5 max on Free).

Cloudflare Workers Free Tier Limits

The free tier provides a substantial starting point for side projects. Note that Pages Functions share the same 100,000 requests/day quota as Worker invocations Cloudflare Workers limits docs. For a deep dive on the hosting part of the stack, see our Cloudflare Pages free tier guide.

Resource Free Tier Limit Source
Requests 100,000 / day (resets midnight UTC; exceeded → Error 1027) Cloudflare Workers limits docs
CPU time 10 ms per invocation (network I/O — fetch, KV/D1/R2 reads — does NOT count toward CPU) Cloudflare Workers limits docs
Memory 128 MB per isolate Cloudflare Workers limits docs
Subrequests 50 per request (fetch calls, KV/D1/R2 ops count as subrequests) Cloudflare Workers limits docs
Workers per account 100 Cloudflare Workers limits docs
Cron Triggers per account 5 Cloudflare Workers limits docs
Worker size (bundled code) 3 MB Cloudflare Workers limits docs
Workers KV 100,000 reads/day, 1,000 writes/day, 1,000 deletes/day, 1 GB stored Cloudflare Workers pricing docs
D1 (serverless SQLite) 5,000,000 rows read/day, 100,000 rows written/day, 5 GB storage, zero egress charges Cloudflare Workers pricing docs
Workers Logs 200,000 log events/day, 3-day retention (Logpush NOT included on Free) Cloudflare Workers pricing docs
Workers AI 10,000 Neurons/day Cloudflare Workers AI pricing docs
Queues 10,000 operations/day, 24-hour message retention (non-configurable) Cloudflare Workers pricing docs
Static assets 20,000 files per Worker version, 25 MiB per file; requests to static assets are free and unlimited Cloudflare Workers limits docs
Paid plan $5/month minimum; 10M requests/month included; CPU up to 5 min/invocation; adds Vectorize and Containers Cloudflare Workers pricing docs

The 100,000 requests/day cap sustains roughly 70 requests per minute around the clock — derived arithmetic from the official limits docs. For AI inference, 10,000 Neurons can process approximately 2.4 million input tokens of llama-3.1-8b-instruct-fp8-fast daily, a calculation derived from the official model pricing table. For handling file storage and object operations, consider our Cloudflare R2 free tier guide, which offers 10 GB of storage with zero egress. If you need a higher-performance AI API, compare this with our Groq free tier guide.

Common Mistakes to Avoid

Beginners most often trip over five limits on the Workers free plan, each with a specific error code or workaround. Understanding these prevents frustration when your Worker fails.

  1. Error 1027: Exceeded Daily Request Limit. This means you’ve used all 100,000 requests for the day. By default, the Worker is bypassed (“fail open”) so your site keeps working but the logic stops silently Cloudflare Workers limits docs. Monitor usage and consider the paid plan for higher traffic.
  2. Error 1102: Worker Exceeded CPU Resource Limits. This sneaky limit is the 10 ms CPU time cap. CPU time is not wall time; heavy operations like large JSON parsing, complex regex, or cryptographic functions burn it quickly Cloudflare Workers limits docs. Optimize code or break tasks into smaller Workers.
  3. KV Write Operations Cap. The free tier allows only 1,000 writes per day to KV Cloudflare Workers pricing docs. If your application requires frequent writes, use D1 instead or batch updates.
  4. Subrequest Fan-out Limit. You can only make 50 subrequests per incoming request, and each outgoing connection counts Cloudflare Workers limits docs. For tasks needing many parallel calls, use Queues to batch and process asynchronously.
  5. 3 MB Worker Size & 3-Day Log Retention. Your bundled code cannot exceed 3 MB Cloudflare Workers limits docs, and logs are kept for only 3 days without Logpush (a paid feature) Cloudflare Workers pricing docs. Keep code concise and export important logs externally if needed.

FAQ

Do I need a credit card to use Cloudflare Workers?

No. Signup requires only an email address, and no payment details are collected during account creation. The free plan is $0/month with no time limit, so you can stay on it indefinitely. The only point where Cloudflare asks for a card is when you upgrade to the paid plan, per the Cloudflare Workers pricing docs.

Is the free tier enough for a production side project?

For most side projects, yes: 100,000 requests/day serves thousands of real users, with D1 and KV included. Each Worker also gets 128 MB of memory and 5 cron triggers for scheduled jobs like nightly syncs. The constraints to plan around are the 10 ms CPU cap, KV’s 1,000 writes/day, and 3-day log retention, per the Cloudflare Workers pricing docs.

When should I upgrade to the Workers paid plan?

Upgrade when you hit the free caps: the paid plan costs $5/month minimum with 10M requests/month included and CPU time up to 5 minutes per invocation, up from 10 ms. You also get bigger D1, KV, Queues, and Logs allowances. Vectorize and Containers are paid-only features that become available once you upgrade, per the Cloudflare Workers pricing docs.

Where to Go Next

For hands-on details on every feature, the Cloudflare Workers get-started guide is the definitive reference.