vercel.json Simulator

vercel.json Redirects Tester Online & Rewrites Simulator

Online vercel.json validator and rewrites simulator—test path-to-regexp wildcards, permanent (308/307) vs statusCode, and conditional has/missing matchers 100% locally.

Presets:
vercel.json3 rules
Try:
301 PERMANENT1 hop
< 1ms local
Resolved Destination URL

https://example.com/articles/2026/edge-routing?utm_source=hn

Evaluation Trace

Hop-by-Hop & Exact Rule Priority Breakdown

2 rule checks
Hop 1https://example.com/blog/2026/edge-routing?utm_source=hn
301 REDIRECT
→https://example.com/articles/2026/edge-routing?utm_source=hn
Captures::slug = 2026/edge-routing
SKIP

Rule #1 (redirect) /old-post

Skipped: path "/blog/2026/edge-routing" did not match "/old-post"

vercel.json Reference

Debug Vercel Routing Conditions & Wildcards Before Deploying

Run a fast vercel.json redirects tester online in your browser. Inspect redirects and rewrites, named captures, and shadowed catch-alls with zero uploads.

has & missing Conditions

Test host, header, cookie, and query matchers—including named regex captures interpolated into destination.

statusCode vs permanent

Resolves permanent: true (308), permanent: false (307), omitted defaults (308), and conflicting statusCode rules.

path-to-regexp Linter

Catches missing leading slashes, shadowed routes under /(.*), duplicate sources, and root /:path* edge cases.

Execution & Conditions

How vercel.json Redirects & has/missing Conditions Evaluate

Vercel runs redirects before filesystem routes and rewrites via path-to-regexp. Use this vercel has condition redirect tester to verify host, header, cookie, and query matchers locally.

Rule Precedence

has/missing Captures & Quotas

has and missing clauses support regex captures such as (?<subDomain>www|app) interpolated into destination. This vercel.json validator online also checks Hobby (1,024) and Pro (2,048) limits and shadowed catch-alls.

Compare with our next.config.js redirects tester or migrate rules using the vercel.json to Cloudflare redirects converter.

{
  "source": "/:path+",
  "has": [{ "type": "host", "value": "(?<subDomain>www|app)\\.example\\.com" }],
  "destination": "https://example.com/:subDomain/:path+",
  "permanent": true
}

Proxy & Status Rules

Rewrites vs Redirect Hop Chains

The vercel.json rewrites simulator resolves internal 200 proxies immediately without modifying the address bar, while redirects trace up to 10 hops to expose loops.

Need multi-platform comparisons? Open the redirects tester online.

"rewrites": [
  { "source": "/api/v1/users/:id(\\d+)", "destination": "/api/v2/members?id=:id" }
]

Syntax Reference

Patterns, Status Codes & Matching Semantics

Pattern / SyntaxBehaviorExample
:slugMatches a single non-empty path segment
:path*Matches zero or more trailing segments
:id(\\d+)Named parameter constrained by inline regex
has / missingHost, header, cookie, or query clauses with regex captures

FAQ

Common Questions & Edge Cases

What happens if I omit permanent and statusCode in vercel.json?

Vercel defaults permanent to true, issuing a 308 Permanent Redirect unless statusCode or permanent: false (307) is set.

Why does /:path* behave differently on root "/" in Vercel?

Pattern /:path* can skip bare / in edge matching. Add an explicit "source": "/" rule alongside "/:path+" to cover root traffic.

Can I set both permanent and statusCode on one rule?

No, Vercel treats them as mutually exclusive. This vercel.json validator online warns whenever both appear on the same entry.

Do vercel.json rewrites change the browser URL?

No. Rewrites return an internal 200 response from the destination while preserving the original URL in the address bar.