Skip to main content

Wrangler Config Generator

Generate a complete wrangler.toml for Cloudflare Workers or Pages. Configure KV namespaces, D1 databases, R2 buckets, environment variables, and routes — then download or copy the config.

✓ Workers, Pages & Durable Objects ✓ KV / D1 / R2 bindings ✓ Download-ready wrangler.toml

Frequently Asked Questions

What is wrangler.toml?▼

wrangler.toml is the configuration file for Cloudflare Workers and Pages projects. It tells Wrangler (Cloudflare's CLI) how to build, deploy, and configure your worker — including its name, entry point, bindings (KV, D1, R2, Durable Objects), environment variables, and routing rules.

What's the difference between Workers and Pages in Wrangler?▼

Cloudflare Workers are serverless scripts that run at the edge. Cloudflare Pages is a full-stack platform for deploying frontend apps with optional Functions (which are also Workers under the hood). For Pages, you set pages_build_output_dir instead of main. For Workers, you point main to your TypeScript/JavaScript entry file.

What is the compatibility_date?▼

The compatibility_date field controls which version of Cloudflare's runtime APIs your Worker uses. Cloudflare introduces breaking changes on new dates — setting this date pins your Worker to a specific runtime behavior. Always use a recent date for new projects. Changing it later may require code updates, so test after bumping.

When should I use node_compat = true?▼

Enable node_compat when your Worker imports Node.js built-in modules like path, crypto, buffer, or stream. Cloudflare polyfills many Node.js APIs in its runtime. Without this flag, imports like import { createHash } from 'crypto' will fail. Note: not all Node.js APIs are supported — check Cloudflare's compatibility matrix.

How do I get my KV namespace ID or D1 database ID?▼

Run `wrangler kv:namespace create MY_NAMESPACE` to create a KV namespace and get its ID. For D1, run `wrangler d1 create my-database`. Both commands output the IDs you need. For production, you need a separate namespace ID; for local dev, Wrangler uses a local SQLite/in-memory store unless you provide a preview_id.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →