Multiple find and replace
Rename ACME Corp to Nova Labs, ACME to Nova and the support address in one pass: 3 pairs, 3 changes, applied in the order you list them. Put longer phrases first, use up to 100 pairs, and every match is literal. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Editors, localization teams, and automation pipelines often need more than a single find-and-replace: a brand rename, a glossary pack, and a set of template tokens must all land in one consistent pass. An optional case-insensitive flag covers mixed-case drafts so Hello and HELLO can both change without listing variants. Empty search terms in any pair fail with invalid input so bulk jobs never run a silent no-op.
What multiple find and replace means and when to use it
Multiple find and replace means walk an ordered list of search terms and write a replacement for every non-overlapping occurrence of each term, then feed the edited string into the next pair until the list ends. Matching is literal: periods, brackets, and other regex metacharacters are plain text, so glossary packs stay predictable for non-developers and for pipelines that must never surprise on special characters.
Prefer this calculator when the search intent is multiple find and replace, bulk substitutions, apply several replace pairs, terminology pack rewrite, or fill many template tokens in one pass. Typical sources include marketing copy that renames a product family, support macros that update several URLs at once, localization style sheets that swap a dozen banned phrases, and config snippets where placeholders such as company, year, and plan all resolve together.
Pair order is intentional: rewrite longer phrases before shorter substrings so ACME Corp becomes Nova Labs before a later ACME to Nova rule runs, avoiding partial clobber. Optional case-insensitive matching folds letter case for every pair so a single pack catches mixed drafts. Do not use this product when you need capture groups, lookarounds, or a full multi-line regex engine—that is a different intent served by dedicated regex tools.
A single-pair landing exists for one search term; this page is for the multi-pair workflow.
What you can do with it
Brand and terminology packs
Apply a glossary of old product names, legal entities, and short forms in one ordered pass so longer phrases rewrite before shorter substrings and every document gets the same terminology set.
FAQ
What happens if a search term is empty?
An empty find in any pair is rejected so pipelines never run a silent no-op or the classic empty-string replace-everywhere footgun; those failures are not charged.
In what order are the pairs applied?
Strictly sequential: the first pair edits the original text, the second pair edits that result, and so on. Later pairs can rewrite text introduced by earlier replacements—list longer phrases before shorter ones when order matters.
Is the multiple find and replace tool free?
The browser tool runs free on your device.
Does find support regular expressions?
No. Each search term is always treated as a literal string. Periods, brackets, and other regex metacharacters match themselves so glossary packs stay predictable for editors and bulk jobs.
How many pairs can I apply at once?
Up to 100 pairs in a single pass. Each pair reports how many times it fired and a total is shown as well, so you can see which glossary entry worked and which one found nothing.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/str/replace-multiple \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello ACME Corp. Welcome to ACME. Contact support@acme.example.","replacements":[{"find":"ACME Corp","replace":"Nova Labs"},{"find":"ACME","replace":"Nova"},{"find":"support@acme.example","replace":"hello@nova.example"}]}'const res = await fetch("https://api.kit.forhosting.com/str/replace-multiple", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "Hello ACME Corp. Welcome to ACME. Contact support@acme.example.",
"replacements": [
{
"find": "ACME Corp",
"replace": "Nova Labs"
},
{
"find": "ACME",
"replace": "Nova"
},
{
"find": "support@acme.example",
"replace": "hello@nova.example"
}
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/str/replace-multiple",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "Hello ACME Corp. Welcome to ACME. Contact support@acme.example.",
"replacements": [
{
"find": "ACME Corp",
"replace": "Nova Labs"
},
{
"find": "ACME",
"replace": "Nova"
},
{
"find": "support@acme.example",
"replace": "hello@nova.example"
}
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/str/replace-multiple", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"Hello ACME Corp. Welcome to ACME. Contact support@acme.example.","replacements":[{"find":"ACME Corp","replace":"Nova Labs"},{"find":"ACME","replace":"Nova"},{"find":"support@acme.example","replace":"hello@nova.example"}]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"Hello ACME Corp. Welcome to ACME. Contact support@acme.example.","replacements":[{"find":"ACME Corp","replace":"Nova Labs"},{"find":"ACME","replace":"Nova"},{"find":"support@acme.example","replace":"hello@nova.example"}]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/str/replace-multiple", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "Hello ACME Corp. Welcome to ACME. Contact support@acme.example.",
"replacements": [
{
"find": "ACME Corp",
"replace": "Nova Labs"
},
{
"find": "ACME",
"replace": "Nova"
},
{
"find": "support@acme.example",
"replace": "hello@nova.example"
}
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "str.replace_multiple",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What multiple find and replace means and when to use it
An empty find string in any pair raises invalid_input, which protects bulk jobs from the classic empty-string replace-everywhere footgun.
Input contract, ordered pairs, and reading the response
Missing replace defaults to the empty string, which deletes every match for that pair. Inside each pair, find also accepts search, needle, from, or old; replace accepts replacement, with, to, or new. At most one hundred pairs are accepted in a single request. Send a JSON body with the required string field text set to the source you want edited and the required array field replacements set to at least one object with a non-empty find string and an optional replace string. Optional case_insensitive defaults to false for exact case; set it true when mixed-case drafts should still match on every pair. Aliases are accepted for older clients: text also as input, value, s, content, or source; replacements as pairs, rules, or substitutions; case_insensitive as ignore_case, ci, or insensitive. Missing text, missing replacements, a non-array list, an empty list, a non-object pair, a non-string find, or an empty find string all raise invalid_input with a message that names the problem, and those failures are not charged on the prepaid API. Use result alone when you only need the cleaned string; use per-pair count when a pipeline logs which glossary entry fired; use total_count when a dashboard tracks edit volume. Keep payloads to ordinary phrase, paragraph, and short document sizes suitable for a Worker isolate rather than multi-megabyte dumps.
API usage, pricing, workflows, and practical limits
Call the free in-browser multiple find and replace tool for paste cleanup, glossary trials, classroom demos, content QA, and multi-token renames without installing a desktop utility or writing nested split-join snippets in every language. Another workflow fills template tokens such as company, product, and plan code by listing each find/replace pair in one request, or deletes a set of deprecated markers by sending empty replace values. Do not expect HTML-aware rewriting that skips tags, structured document merge fields, parallel longest-match resolution, or locale-specific collation beyond standard ignore-case matching—those are separate problems. Authors shipping SDKs can document text and replacements as required fields and show a multi-pair success example plus an empty-find error example so integrators see both sides of the contract. Use the prepaid KIT API when a CMS, ETL job, form backend, support desk, or mobile client needs the same multi-pair transform under balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request. A typical workflow ships a brand rename pack that first rewrites the full legal name, then short forms, then contact addresses, and checks total_count to confirm every expected hit was updated. Pair this endpoint with space tidy or case converters when the next step is style cleanup, but keep multiple find and replace as its own landing so the SEO intent is not mixed with single-pair tools or regex playgrounds.
Integration use cases
Multi-token template filling
Resolve several placeholders—company, product, plan, year—across a draft or macro by listing each find/replace pair instead of chaining single-pair API calls.
QA and deterministic fixtures
Test harnesses pin multi-pair golden outputs so refactors that change pair order, empty-find rejection, or case-insensitive matching fail continuous integration immediately.
Technical questions
How do I run multiple find and replace with this tool?
Send JSON with text set to your source string and replacements set to an array of objects each with a non-empty find and optional replace. Pairs run in order. The response includes result, per-pair counts, and total_count.