vercel.toml on Vercel (November 2026): how to convert vercel.json, with SPA rewrites, branches and the one-file rule

On 2 November 2026 Vercel started accepting vercel.toml as a project configuration file. It takes the same properties as vercel.json but lets you write comments next to a rewrite or a branch rule, which matters when an AI agent edits the file and you want to know later why a line is there. Here's how to convert, the TOML for the configs vibe-coded apps use most, and the mistakes that break a deploy.

Short answer

Yes, Vercel supports vercel.toml for all projects since 2 November 2026. It accepts every property vercel.json does, with comments and a flatter structure. Put it in the project root and delete vercel.json (and any vercel.ts): Vercel says to use only one of vercel.toml, vercel.json or vercel.ts per project. Top-level keys become key = value lines, objects become [tables], and arrays of objects such as rewrites, redirects and headers become [[rewrites]] blocks. Quote keys that contain $, * or / ("$schema", "agent-*"). Your existing vercel.json keeps working; you don't have to switch. For local builds, the Vercel CLI changelog shows vercel.toml always on since CLI 58.0.0.

What Vercel shipped on 2 November 2026

Vercel's changelog of 2 November 2026 says projects can now be configured with vercel.toml, using the TOML format instead of JSON.

  • Who: all projects.
  • What it accepts: the same configuration properties as vercel.json. Vercel's docs list buildCommand, outputDirectory, rewrites, redirects, headers, crons, functions, git settings and the rest; the static formats share one property set.
  • What's different: TOML supports comments, and nested settings (Services, rewrites) read top to bottom instead of as one big nested object.
  • Where it goes: create vercel.toml in your project root and commit it with your code.
  • The rule: use only one project configuration file: vercel.toml, vercel.json or vercel.ts.

Nothing forces a switch. vercel.json is still a supported static format, so if your current config deploys fine and nobody edits it, leaving it alone is a valid choice.

vercel.json vs vercel.toml vs vercel.ts

Vercel's three project configuration files, per Vercel's project configuration docs (checked 19 Nov 2026)
vercel.jsonvercel.tomlvercel.ts
Format Static JSON Static TOML TypeScript (also .js, .mjs, .cjs, .mts), runs at build time
Properties Full set Same as vercel.json Same names as vercel.json, in a config export
Comments No (JSON has no comment syntax) Yes Yes
Dynamic values (env vars, API calls) No No Yes
Extra package None None @vercel/config for types and helpers
Good fit Small configs, existing projects Large configs: many rewrites, Services Config generated from code or env vars

Whichever you pick, it's the only one in the project. Vercel's docs say you can only use one configuration file per project.

Convert vercel.json to vercel.toml in 4 steps

  • 1. Copy every top-level key into key = value lines. Strings stay in double quotes, true/false stay lowercase. Quote "$schema" because $ isn't allowed in a bare TOML key.
  • 2. Turn nested objects into tables: "git": { "deploymentEnabled": { … } } becomes a [git.deploymentEnabled] header followed by its keys.
  • 3. Turn arrays of objects into arrays of tables: each item in "rewrites": [ … ] becomes its own [[rewrites]] block, in the same order. Order matters for rewrites, so keep the SPA catch-all last.
  • 4. Delete vercel.json (and vercel.ts if you have one), commit vercel.toml, and redeploy. Check a few routes on the preview URL before promoting.
vercel.toml (Vercel's own example: build settings)
"$schema" = "https://openapi.vercel.sh/vercel.json"
buildCommand = "pnpm run build"
outputDirectory = "dist"
cleanUrls = true

Bare TOML keys may only contain letters, digits, underscores and dashes. Anything else, such as a branch pattern with * or /, needs quotes.

SPA fallback in vercel.toml (fix 404 on refresh)

A Vite or React Router app built by Lovable, Bolt or Cursor needs a rewrite that serves index.html for client-side routes, otherwise refreshing /dashboard gives a 404. This is the same rule as the vercel.json fallback in Vercel's Vite docs, written as TOML. We checked that it parses to the identical JSON.

vercel.toml (our TOML translation of Vercel's Vite SPA rewrite)
"$schema" = "https://openapi.vercel.sh/vercel.json"

# SPA fallback: serve index.html for client-side routes.
# Keep this the last rewrite.
[[rewrites]]
source = "/(.*)"
destination = "/index.html"

Don't add this for Next.js or TanStack Start. Those frameworks route on the server, and a catch-all to index.html breaks them (see the TanStack Start 404 fix linked below).

Stop deploys for agent branches

git.deploymentEnabled turns off automatic deployments for branches you name. Vercel's Git configuration docs say branch patterns use minimatch syntax, so one rule can cover every branch your coding agent creates. In TOML the pattern must be quoted.

vercel.toml (our translation of Vercel's git.deploymentEnabled examples)
"$schema" = "https://openapi.vercel.sh/vercel.json"

# Don't deploy commits to these branches
[git.deploymentEnabled]
dev = false
"agent-*" = false   # quoted: * isn't allowed in a bare key

Unquoted, agent-* = false is a TOML syntax error and the file won't parse. Fewer preview builds also means fewer billed build minutes on Pro.

Frontend + backend in one project (Services)

Vercel's announcement uses Services as the main example: a Next.js frontend and a FastAPI backend in one project, with /api routed to the backend. This is the kind of config where TOML's comments and flat tables help most.

vercel.toml (Vercel's changelog example)
"$schema" = "https://openapi.vercel.sh/vercel.json"

# Next.js frontend
[services.frontend]
root = "frontend/"

# FastAPI backend
[services.backend]
root = "backend/"
entrypoint = "main:app"

[[rewrites]]
source = "/api/(.*)"
destination = { service = "backend" }

[[rewrites]]
source = "/(.*)"
destination = { service = "frontend" }

Check the file before you push

Vercel hasn't documented a converter or a validator for vercel.toml. A quick check you can run yourself: Python 3.11+ ships tomllib in the standard library, so this prints your vercel.toml as JSON. If it errors, the TOML is invalid; if it prints, compare it with your old vercel.json.

Terminal
python3 -c "import tomllib, json; print(json.dumps(tomllib.load(open('vercel.toml', 'rb')), indent=2))"

For local builds, update the Vercel CLI. Its changelog shows vercel.toml support turned on for everyone in CLI 58.0.0, and 58.8.0 fixed a bug where a vercel.toml or vercel.ts config made vercel build skip dependency installs for services with their own package.json. The current CLI on npm is 66.2.0 (checked 19 Nov 2026).

Confirmed vs not documented

What Vercel has and hasn't published about vercel.toml (checked 19 Nov 2026)
QuestionStatus
Available to all projects Confirmed (changelog, 2 Nov 2026)
Same properties as vercel.json Confirmed (vercel.toml docs)
Only one config file per project Confirmed (docs and changelog)
What happens if vercel.json and vercel.toml both exist (error or which wins) Not documented
Official vercel.json → vercel.toml converter Not documented
vercel doctor checks vercel.toml Not documented (its announcement mentions vercel.json)
Minimum CLI version Not stated in docs; CLI changelog shows it always enabled from 58.0.0

We'll update this table when Vercel documents any of these.

Common questions

Does Vercel support vercel.toml?

Yes. Since 2 November 2026 all Vercel projects can use vercel.toml. It supports the same configuration properties as vercel.json, plus comments and a flatter structure.

Can I have vercel.json and vercel.toml in the same project?

No. Vercel says to use only one project configuration file: vercel.toml, vercel.json or vercel.ts. Vercel doesn't document which file wins if you keep two, so delete the old one when you switch.

Do I have to migrate from vercel.json?

No. vercel.json is still a supported format. vercel.toml is an alternative, useful when the config is large or you want comments.

How do I write rewrites in vercel.toml?

Each rewrite is its own [[rewrites]] block with source and destination keys, in the same order as the JSON array. For a single-page app, the fallback is source = "/(.*)" and destination = "/index.html" as the last rewrite.

Why does my vercel.toml fail to parse?

The most common cause is an unquoted key with characters TOML doesn't allow in bare keys, such as "$schema" or a branch pattern like "agent-*". Quote those keys. Run the file through Python's tomllib to see the exact line.

vercel.toml or vercel.ts?

vercel.toml is static, like vercel.json. Use vercel.ts when the config needs to be computed at build time, for example from environment variables; it uses the @vercel/config package for types and helpers.

Related on VibeLiftoff