Skip to content
100% local

Redirect rule generator

Turn a list of old-URL/new-URL pairs into ready-to-use redirect rules.

Input
Output

Redirect rule generator

Migrating a site, renaming pages or merging two domains all leave behind old URLs that need to point somewhere new. This tool turns a plain list of old-URL/new-URL pairs into working redirect rules for the server or host you actually deploy to, so you can paste the result straight into a config file instead of hand-writing dozens of near-identical lines.

Paste one pair per line, separated by an arrow, comma, pipe, tab or space — whatever matches how you already have the data, from a spreadsheet export or a quick note. Choose the target format: Apache's .htaccess (a Redirect directive per line), nginx (a location block with a return), Netlify or Cloudflare Pages' _redirects syntax, or plain JSON for feeding into your own build step. Pick 301 for a permanent move that passes on SEO value, 302 for a temporary redirect, or 308 when the request method (like a POST) must be preserved.

Turn on "strip domain" to drop the scheme and host from both sides and keep only relative paths — useful when the redirect lives on the same domain and you'd rather not repeat it on every line. The source path is always written as a path regardless of that setting, since Apache's Redirect directive requires one; the target keeps whatever host you gave it unless you strip it.

With chain and loop detection on, the tool flags rules whose target is itself redirected again (an extra hop for the browser) and rules that redirect back on themselves, directly or in a cycle. Both surface as comments above the rules, or as a warnings list in JSON, so you can fix them before deploying. Everything runs locally — the URLs you paste never leave your browser.

FAQ

Is my list of URLs uploaded anywhere?
No. Parsing and rule generation happen entirely in your browser with JavaScript. Nothing you paste is sent to a server.
What is the difference between 301, 302 and 308?
301 and 308 are permanent redirects search engines pass ranking signals through; 302 is temporary. 308 additionally guarantees the request method (GET, POST…) stays the same, which 301 does not always do in older clients.
What counts as a redirect chain or a redirect loop?
A chain is when the target of one rule is itself the source of another rule, forcing an extra hop. A loop is when following the chain eventually leads back to where it started, which never resolves and needs to be fixed before you deploy.
Can I generate rules for Cloudflare Pages and Netlify the same way?
Yes. Both read a plain-text _redirects file with the same "from to status" syntax, so the same generated output works for either host.
What if a line in my list is malformed?
A line without the chosen separator, or missing either the old or new URL, is skipped rather than stopping the whole batch — the live tally shows how many lines were skipped so you can go back and fix them.