Redirect Rules Converter

Write your redirects once as plain lines of from, to and an optional status code, then output them for nginx, Apache, Caddy, Netlify or Vercel.

Use the tool

Why this tool exists

Redirect lists tend to live in a spreadsheet during a site migration, and then someone has to retype every row into whatever the new host expects. The syntax differs enough to cause mistakes: nginx wants a location block, Apache a Redirect directive, Netlify a bare _redirects line and Vercel a JSON array.

This tool takes one line per rule and writes the matching format, validating that each source starts with a slash and that the status is a real redirect code. It is a good fit for exact-path redirects after a URL change. Pattern rules and regular expressions still need hand-written config.

How to use it

  1. Enter one rule per line as from, to and an optional status code, such as /old /new 301.
  2. Choose the output format: nginx, Apache, Caddy, Netlify _redirects or Vercel JSON.
  3. Copy the result into your server config or redirects file.

Frequently asked questions

Which status codes are allowed?

301, 302, 303, 307 and 308. If you leave the code out it defaults to 301. Any other value stops with an error so you do not ship an invalid redirect.

Can I use wildcards or regular expressions?

No. Each line becomes an exact-path rule, such as location = /old in nginx. For pattern redirects, write those by hand or start from the generated block and extend it.

Where do I paste the nginx output?

Inside the relevant server block of your nginx config, then reload nginx. The location blocks use an exact match, so they should not clash with your catch-all location.

Can the target be a full URL?

Yes. The destination can be a path or an absolute URL such as https://example.com/new. The source must be a path starting with a slash.