Find and replace text
Swap fox for cat in "The quick brown fox jumps over the lazy dog. The fox is quick." and both matches change: 2 replacements, counted for you. Dots and brackets are searched as plain characters, never as patterns. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Find
- fox
- Replace
- cat
- Quantity
- 2
- Length
- 62
- Original length
- 62
Writers, editors, and automation pipelines constantly need to swap one phrase for another across a block of text without opening a full word processor or writing a one-off script. An optional case-insensitive flag covers mixed-case drafts where The Brand and the brand should both change. Empty search terms fail with invalid input so bulk jobs never run a silent no-op.
What find and replace means and when to use it
Find and replace means scan the entire source string for every non-overlapping occurrence of a search term and write a replacement string in its place, including zero-length replacement when you want to delete every match. Matching is literal: if you search for a period or a parenthesis, those characters are plain text, not regular-expression syntax, so the tool stays predictable for non-developers and for pipelines that must never surprise on special characters.
Prefer this calculator when the search intent is find and replace text, replace all occurrences, swap a phrase in a document, or bulk rename a token inside pasted copy. Typical sources include marketing blurbs with a product name that changed, support macros with outdated URLs, CSV cells with a legacy code, and notes where a misspelling repeats. Optional case-insensitive matching folds letter case so a single pass catches Hello, HELLO, and hello without listing variants.
Do not use this product when you need capture groups, lookarounds, or multi-line regex engines—that is a different intent served by dedicated regex tools.
What you can do with it
Brand and product name updates
Swap an old product name or SKU for the new one across pasted marketing copy and CMS fields, with an optional case-insensitive pass for mixed drafts.
Token cleanup in templates and macros
Delete or rewrite placeholder tokens and legacy URLs in support macros, email snippets, and config snippets before publish.
FAQ
How do I find and replace text with this tool?
Optional replace is the substitution (defaults to empty, which deletes matches). The response includes result and count.
What happens if the search term is empty?
An empty find string is rejected so pipelines never run a silent no-op or the classic empty-string replace-everywhere footgun; those failures are not charged.
Can I match without caring about letter case?
Matching stays literal for characters; only letter case is ignored.
Is the find and replace text tool free?
The browser tool runs free on your device.
Does find support regular expressions?
No. The search term is always treated as a literal string. Periods, brackets, and other regex metacharacters match themselves so the behavior stays predictable for editors and bulk jobs.
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/find-replace \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"The quick brown fox jumps over the lazy dog. The fox is quick.","find":"fox"}'const res = await fetch("https://api.kit.forhosting.com/str/find-replace", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "The quick brown fox jumps over the lazy dog. The fox is quick.",
"find": "fox"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/str/find-replace",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "The quick brown fox jumps over the lazy dog. The fox is quick.",
"find": "fox"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/str/find-replace", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"The quick brown fox jumps over the lazy dog. The fox is quick.","find":"fox"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"The quick brown fox jumps over the lazy dog. The fox is quick.","find":"fox"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/str/find-replace", 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": "The quick brown fox jumps over the lazy dog. The fox is quick.",
"find": "fox"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "str.find_replace",
"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 find and replace means and when to use it
An empty search term raises invalid_input, which protects bulk jobs from the classic footgun of replacing the empty string between every character.
Input contract, empty search rejection, and reading the response
Optional replace defaults to the empty string, which deletes every match. Use result alone when you only need the cleaned string; use count when a pipeline logs how many edits ran; use original and result together when a demo UI must show before-and-after. Source text follows the same retention rules as other KIT parse items. Send a JSON body with the required string field text set to the source you want edited and the required string field find set to a non-empty search term. Optional case_insensitive defaults to false for exact case; set it true when mixed-case drafts should still match. Aliases are accepted for older clients: text also as input, value, s, content, or source; find as search, needle, from, or old; replace as replacement, with, to, or new; case_insensitive as ignore_case, ci, or insensitive. Missing text, missing find, a non-string value, 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. 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 find and replace text tool for paste cleanup, classroom demos, content QA, and quick renames without installing a desktop utility or writing split-join snippets in every language. A typical workflow replaces a brand name or SKU code across a product description before publish, then checks count to confirm every expected hit was updated. Do not expect HTML-aware rewriting that skips tags, structured document merge fields, or locale-specific collation beyond standard ignore-case matching—those are separate problems. Authors shipping SDKs can document text and find as required fields and show a multi-match 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 transform under balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request. Another workflow deletes a deprecated token by sending an empty replace, or normalizes mixed-case variants with case_insensitive true before search indexing. Pair this endpoint with space tidy or case converters when the next step is style cleanup, but keep find and replace as its own landing so the SEO intent is not mixed with whitespace or slug tools.
Integration use cases
QA and deterministic fixtures
Test harnesses pin find-and-replace golden outputs so refactors that change match rules or empty-find rejection fail continuous integration immediately.