Dev Encyclopedia
ArticlesTools

Get notified when new content drops

No spam. Just new articles, tools, and updates straight to your inbox.

Dev Encyclopedia

A reference for builders

Content

  • Articles
  • Tools
  • Contact

Connect

  • support@devencyclopedia.com
  • RSS Feed

© 2026 Dev Encyclopedia

Privacy PolicyTermsDisclaimer
  1. Home
  2. /
  3. Tools
  4. /
  5. RedirectConverter
Free · Private · No account

Stop hand-translating your redirects between platforms.

Paste your next.config.js redirects, headers, or rewrites block and get the equivalent config for Netlify, Vercel, or Nitro instantly.

How RedirectConverter works

  1. 1

    Paste your next.config.js block

    Paste the full async function (e.g. async redirects() { return [...] }) or just the returned array. The tool accepts redirects, headers, and rewrites blocks. Comments and trailing commas are handled automatically.

  2. 2

    Select the rule type

    Choose Redirects, Headers, or Rewrites, or leave it on "Auto-detect." The tool detects the type from the function name or from the shape of the objects (presence of a headers array, permanent field, etc.).

  3. 3

    Pick your target format

    Choose between netlify.toml (Netlify), vercel.json (Vercel), or nitro.config.ts (Nitro, used by TanStack Start, Nuxt, and other Nitro-based frameworks).

  4. 4

    The parser extracts your rules

    A restricted JavaScript object literal parser (not eval) tokenizes your input, handles unquoted keys and single-quoted strings, and produces a structured array of rule objects.

  5. 5

    Path patterns are translated

    Next.js path patterns like :path* are converted to the target format's equivalent: * and :splat for Netlify, ** for Nitro. Named parameters like :slug are preserved where the target supports them.

  6. 6

    Output, mapping table, and warnings

    You get the complete converted config with a copy button, a per-rule mapping table showing how each input rule translated, and warnings for any rules that don't convert cleanly (e.g. conditional 'has' matching).

What each target format looks like

The same redirect rule produces different syntax depending on the target platform. Here is how a simple permanent redirect from /old to /new looks in each format.

netlify.toml
[[redirects]]
  from = "/old"
  to = "/new"
  status = 301
vercel.json
{
  "redirects": [
    {
      "source": "/old",
      "destination": "/new",
      "permanent": true
    }
  ]
}
nitro.config.ts
export default defineNitroConfig({
  routeRules: {
    '/old': { redirect: { to: '/new', statusCode: 301 } },
  },
})

Path pattern translation reference

Next.js, Netlify, and Nitro use different syntax for dynamic path segments and wildcards. This table shows how RedirectConverter maps each pattern.

Next.js patternNetlifyVercelNitro
/blog/:slug/blog/:slug/blog/:slug/blog/*
/docs/:path*/docs/*/docs/:path*/docs/**
/(.*)/*/(.*)/**
/static/file/static/file/static/file/static/file

Vercel uses the same path syntax as Next.js (both are Vercel products), so redirect rules transfer with minimal changes. Netlify uses * for catch-all and :splat in the destination. Nitro uses ** for recursive glob matching.

When to use RedirectConverter

ScenarioSourceTarget
Migrating from Next.js to TanStack Startnext.config.js redirects/rewritesnitro.config.ts routeRules
Moving from Vercel to Netlify hostingnext.config.js or vercel.jsonnetlify.toml
Moving from Netlify to Vercel hostingnext.config.jsvercel.json
Consolidating security headers for a Nitro deploynext.config.js headers()nitro.config.ts headers
Verifying manual translation of redirect rulesYour existing configAny format for comparison
API proxy migration (rewrites to Nitro proxy)next.config.js rewrites()nitro.config.ts proxy rules

Frequently Asked Questions

What is RedirectConverter and how does it work?

RedirectConverter is a free browser tool that converts redirect, header, and rewrite rules from Next.js's next.config.js format into the equivalent config for Netlify (netlify.toml), Vercel (vercel.json), or Nitro (nitro.config.ts, used by TanStack Start and Nuxt).

Paste your config block, select a target format, and the tool parses the JavaScript object literal, maps each rule to the target platform's syntax (including path pattern translation), and generates the complete output with a per-rule mapping table.

How do Next.js redirects differ from Netlify redirects?
Next.js (next.config.js)Netlify (netlify.toml)
FormatJavaScript objects in an async functionTOML key-value pairs
Path params:slug, :path*:slug works, :path becomes / :splat
Status codespermanent: true/false or statusCodeExplicit status field (301, 302, 200)
Conditional matchinghas/missing (header, cookie, query)Not supported in standard redirects
RewritesSeparate rewrites() functionRedirect with status = 200

⚠ Warning

Next.js 'has' and 'missing' conditions (matching by header, cookie, or query parameter) have no equivalent in Netlify's redirect format. RedirectConverter flags these rules for manual review.

Does RedirectConverter send my config anywhere?

No. All parsing and conversion runs in JavaScript inside your browser. Nothing leaves your machine. The tool has no backend, no API calls, and no analytics on the config you paste.

💡 Tip

You can use RedirectConverter offline once the page is loaded. It works without a network connection.

How do I convert Next.js redirects to Nitro routeRules for TanStack Start?

Select 'nitro.config.ts' as the target format and paste your next.config.js redirects block. RedirectConverter converts each rule to Nitro's routeRules syntax, translating path patterns (e.g. :path becomes *) and status codes.

typescript — nitro.config.ts
export default defineNitroConfig({
  routeRules: {
    '/old-path': { redirect: { to: '/new-path', statusCode: 301 } },
    '/docs/**': { redirect: { to: '/new-docs/**', statusCode: 302 } },
  },
})

ℹ Info

Nitro routeRules use glob patterns ('' for single segment, '' for catch-all), not named parameters like Next.js. If your source paths use named params like ':slug', RedirectConverter converts them to '' and flags the rule for manual review.

What happens to 'has' and 'missing' conditions during conversion?

Next.js supports conditional redirects that only trigger when a specific header, cookie, query parameter, or host matches. Not all platforms support this.

PlatformCondition support
Vercel (vercel.json)Full support: has/missing fields carry over directly
Netlify (netlify.toml)Not supported: conditions are stripped with a warning
Nitro (nitro.config.ts)Not supported: conditions are stripped with a warning

When converting to Netlify or Nitro, RedirectConverter includes a warning for every rule that uses conditions, so you know exactly which rules need manual attention.

What input formats does RedirectConverter accept?

You can paste any of these formats and the tool will extract the rules array automatically:

  • The full async function: async redirects() { return [...] }
  • Just the returned array: [{ source: '...', destination: '...' }]
  • Config with comments: single-line (//) and multi-line (/ /) comments are stripped
  • Single-quoted or double-quoted strings
  • Trailing commas (standard in most JS configs)

ℹ Info

The parser handles JavaScript object literal syntax (unquoted keys, single quotes, trailing commas) without using eval(). It does not execute your code.

Can I convert vercel.json to netlify.toml?

Yes, indirectly. Vercel's redirect format is nearly identical to Next.js's format (same source/destination/permanent fields). Paste the 'redirects' array from your vercel.json, select 'Redirects' as the rule type, choose netlify.toml as the target, and convert.

The same approach works for headers and rewrites arrays from vercel.json.

Related reading

Guide

Next.js Environment Variables

How Next.js handles .env files and config. Useful context when migrating a Next.js project to a new platform.

Tutorial

GitHub Actions CI/CD Tutorial

Set up automated deployments that work with any hosting platform, including Netlify, Vercel, and self-hosted Nitro.

Load: