urltoolskit.org
URL utilities, in the browser
Say hi →

Bulk URL find and replace

literal or regex · scoped to host, path, query or fragment · before/after preview

Domain change, HTTP to HTTPS, a path prefix that moved — all one substitution across a few thousand URLs. Doing it in a text editor works until the string you are replacing also appears in a query parameter. Scope the change to the host, or the path, or the query, and the rest of every URL is untouchable.

Preview

Ready.

How to use

  1. Paste the URL list.
  2. Fill in Find and Replace with. The preview updates as you type, so you see the effect before committing to it.
  3. Set Apply to. This is the part that makes bulk rewriting safe — replacing a domain name in Host only cannot touch a ?ref= parameter that happens to contain the same string.
  4. Turn on regular expression for anything structural — capture groups work in the replacement as $1, $2.
  5. Check the Preview table: changed rows are marked, unchanged rows are dimmed, and the status line counts how many were affected. If that count is not what you expected, the pattern is wrong.

Patterns worth knowing

GoalScopeFindReplace
Change domainHost onlyold.example.comnew.example.com
Force HTTPSScheme onlyhttphttps
Move a path prefixPath only^/blog/ (regex)/articles/
Drop a path prefixPath only^/en/ (regex)/
Add a trailing slashPath only([^/])$ (regex)$1/
Strip a file extensionPath only\.html?$ (regex)(empty)
Swap a subdomain for a pathThe whole URL://shop\.(.+?)/ (regex)://$1/shop/
Rename a query parameterQuery only\bpid= (regex)product_id=

One caution on the regex mode: when the Apply to scope is a single component, anchors mean what you would hope — ^ is the start of the path, not of the URL. In whole URL scope, ^ is the scheme, which is almost never where you want to anchor a path rule. If a pattern is matching nothing, that mismatch is usually why.

FAQ

Why is a URL unchanged when the string is clearly in it?

Almost always a scope mismatch — the string is in the query but the scope is Path only, or vice versa. Switch to The whole URL to confirm the pattern matches at all, then narrow the scope again.

Do component scopes re-encode the URL?

Yes — scoped replacements go through the browser's URL parser, so the output is normalized: the host is lowercased, a default port is dropped, and illegal characters in your replacement are percent-encoded. Use The whole URL scope for byte-exact string surgery.

Can I use capture groups?

Yes, with regular expression on. $1 through $9 and $& for the whole match all work, as in JavaScript's String.replace.

What if I need different replacements per URL?

That is a mapping, not a substitution — put the old and new pairs into the redirect map generator, which takes two columns and emits server config.