vercel.json Builder

Generate a vercel.json with routes, rewrites, and environment settings

Creates a vercel.json with rewrites, redirects, custom headers, function region pinning, cron jobs, and a framework override, output as valid JSON ready to commit to your project root.

Where does vercel.json go?

It belongs at the root of your project. Vercel reads it during build and deploy, and its settings take precedence over equivalent options configured in the project dashboard.

A valid vercel.json from simple inputs

vercel.json controls how Vercel routes requests, sets headers, pins function regions, and runs scheduled jobs. The schema mixes arrays of objects with specific keys, and a single typo can be silently ignored. This builder assembles a clean, valid configuration so each feature is wired correctly.

How it works

The output is a JSON object whose keys map directly to Vercel features. rewrites and redirects are arrays of objects with source and destination; redirects also carry a permanent flag controlling 308 versus 307. headers is an array pairing a source glob with a list of header name and value objects. crons is an array of path and schedule pairs using standard cron syntax. functions region pinning is expressed through the regions array, and framework overrides auto-detection. Empty sections are omitted so the file stays minimal.

Tips and example

Add a rewrite from /api/(.*) to an upstream to proxy requests, and a redirect from /old to /new marked permanent for SEO. Pin functions with regions set to iad1 if your database is in US East. Schedule a daily job with path /api/cron and schedule 0 2 * * * to run at 02:00 UTC. Commit the resulting vercel.json and Vercel applies it on the next deployment.