1001Ferramentas
☁️Dev

Cloudflare wrangler.toml Generator

Generates a wrangler.toml for Cloudflare Workers, with name, compatibility date, environment variables and a KV namespace. Routes are yours to add.



  

A minimal Worker wrangler.toml, explained

wrangler.toml tells Cloudflare which file is your Worker, what name it deploys under and which resources it can reach. Newcomers usually trip on compatibility_date and on bindings: without them, or with the wrong KV id, wrangler deploy stops with an error. This page shows a minimal Worker config carrying a name, an entry point, a compatibility date, one variable and a KV binding.

The page has no inputs: the TOML is fixed, already rendered on load, and the button only redraws it. Two honest caveats. This is a Workers config, not a Pages one, and a Pages project uses pages_build_output_dir with a different layout. And despite what the tool description claims, there is no routes key in the output, so add routes or route yourself if you need a custom domain.

Replace your-kv-namespace-id with the real one, which wrangler kv namespace create CACHE prints for you, or delete the whole [[kv_namespaces]] block, because the placeholder alone fails the deploy. Bump compatibility_date to today for a new project; the 2024 value pins the runtime to older behavior. And keep tokens out of [vars], which goes into git: use wrangler secret put. Generated locally in your browser.

Frequently asked questions

Does it work for Cloudflare Pages?
Not as written. This is a Worker config; a Pages project uses pages_build_output_dir and build keys, and main means nothing over there.
What happens if I leave the KV id untouched?
The deploy is rejected, because Cloudflare validates the namespace. Create it with the CLI and paste the real id, or remove the block if you do not use KV.
Can I use wrangler.jsonc instead of TOML?
Yes. Recent wrangler versions accept JSON and JSONC with the same keys; TOML still works and is the format this page emits.

Related Tools