Text Replacer: Replace Words in Bulk Instantly
Find and replace text instantly, with optional case-sensitive and regex matching.
About Find & Replace
Find & Replace changes every occurrence of a word, phrase or pattern in a block of text. Paste the text into the top box, type what to look for in Find and its substitute in Replace with, then click Replace All. The edited text appears in the bottom box, the original stays intact, and a status line counts the replacements. Options: Case sensitive, Whole word and Regex.
People use it to correct a name misspelled throughout a report, change a company name in a long document, swap a domain across a list of links, or fix Urdu text typed with Arabic keyboard letters, for example replacing Arabic ك and ي with Urdu ک and ی. With Regex on, it can also join lines. The page does the work on your device.
By default the search ignores capitals and treats your Find text literally, so a full stop or bracket needs no escaping. Every match is always replaced; there is no replace-one or find-next button. Regex mode accepts JavaScript patterns, but the Replace with field is inserted exactly as typed, so group references such as $1 are not available.
How to use Find & Replace
- Paste your text into the top box.
- Type the word or pattern to look for in Find and the new text in Replace with. Leave Replace with empty to delete every match.
- Tick Case sensitive to match capitals exactly, Whole word to skip matches inside longer words, or Regex to treat Find as a regular expression.
- Click Replace All.
- Check the status line for the number of matches replaced and read the result in the bottom box. If it says Invalid pattern, correct the Find field.
- Click Copy to take the result, or paste it into the top box for another round.
Tips for best results
- The tool edits a copy, not your input. For several replacements in a row, move the result back into the top box before each new Replace All.
- Whole word understands only English letters, digits and underscores. With Urdu words, or Find text that starts or ends with a symbol such as #tag, it finds nothing, so untick it for those.
- With Regex and Whole word together, alternatives need brackets. cat|dog is wrapped as \bcat|dog\b, which matches the cat in catalog; write (cat|dog) instead.
- In Replace with, $1, $& and \n are plain text, not group references or a line break. In Find, \n does match a line break, so replacing it with a space joins lines.
- There is no multiline or Unicode flag. ^ and $ match only the start and end of the whole text, a dot does not match a line break, and escapes such as \p{L} do not work.
Frequently asked questions
How do I search and replace text online?
Paste your text in the top box, type the word to search for in Find and its replacement in Replace with, then click Replace All. The changed text appears in the bottom box and the status line shows how many matches were replaced. Nothing is uploaded; it all happens in your browser.
How do I replace all occurrences of a word?
Replace All always changes every match, there is no replace-one button. To change only some, make Find more specific (for example add the words around it), tick Whole word to skip matches inside longer words, or tick Case sensitive to match capitals exactly.
What is a string replacer?
A string replacer swaps one piece of text, called a string, for another throughout a document. This tool is one: it replaces plain text by default, and with Regex ticked it can replace patterns such as every line break or every run of spaces.
How do I find text in a long document, or count a word?
There is no highlight or find-next. To count a word, type it in both Find and Replace with, tick Case sensitive so its capitals stay as they are, and click Replace All. The text stays the same and the status line shows how many matches there were.
Can I use a regular expression to find text?
Yes, enable the Regex option to use full JavaScript regular expression patterns in the Find field.
Does it tell me how many replacements were made?
Yes, the status line shows the number of matches that were replaced.
Is matching case sensitive by default?
No. Capitals are ignored until you tick Case sensitive, so Karachi, karachi and KARACHI all match.
How do I replace line breaks with spaces?
Tick Regex, type \n in Find, put a single space in Replace with and click Replace All. Every line break in the pasted text becomes a space.
What happens if Replace with is empty?
Every match is deleted. This works for removing a repeated word, a prefix or a symbol, and the status line still reports the count.
Why do I see Invalid pattern?
Regex is ticked and Find is not a valid JavaScript pattern, for example an unclosed bracket. The text after the colon describes the problem; untick Regex if you meant a plain search.