Find and Replace Tool

Replace text and see how many changes were made.

How it is calculated

The tool takes three text fields: the text, the string to find and the replacement. It counts how many times the search string occurs, then swaps every occurrence for the replacement and shows the new text and the count. Nothing is changed in your original input.

Matching is plain and case-sensitive: cat does not match Cat. There are no wildcards or regular expressions, so characters such as . or * are matched literally. Matches are found from left to right without overlapping, and the match can be part of a longer word. The text and search fields must not be empty; an empty replacement is allowed and simply deletes every match.

Worked example

Text: Ali kedi sevdi. Kedi uyudu. Sonra kedi kostu. Find kedi, replace with köpek. Scanning left to right, the lowercase kedi appears twice; Kedi with a capital K is a different string and is skipped. The output is Ali köpek sevdi. Kedi uyudu. Sonra köpek kostu. with a replacement count of 2, which is how you spot that the capitalised word was left untouched.

Try this example →

Common mistakes

  • Expecting case-insensitive matching. 'cat' will not replace 'Cat' or 'CAT', so run it again for each variant.
  • Searching for a short fragment that sits inside other words: replacing 'art' also changes 'party' and 'smart'. Check the count.
  • Typing regex syntax like \d+ or .*; it is searched literally and will usually match nothing.
  • Leaving a trailing space in the find field, which then fails to match at the end of a line or sentence.
  • Forgetting that overlapping matches are not counted twice: replacing 'ana' in 'banana' changes only one occurrence.

About this calculator

This tool scans a block of text for every occurrence of a given search string and swaps each one for a replacement string, then reports exactly how many replacements were made so you can confirm the change matched what you expected. Because it operates on the whole text at once, it avoids the error-prone process of manually hunting down and editing each occurrence by hand.

It is used by writers and editors updating a name, term or formatting convention that appears many times throughout a document, by developers doing quick bulk edits to a config file, CSV or code snippet without opening a full editor, and by anyone cleaning up copy-pasted text — removing stray characters, fixing a consistently misspelled word, or standardizing spacing. Seeing the replacement count is also a useful sanity check: an unexpectedly high or low number often reveals that the search text also matched somewhere it shouldn't have, or that it appears less often than assumed.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Because matching is exact and case-sensitive, the count is your safety net: run it once with the replacement left empty to see how many hits you get, then compare. A short search string can match inside longer words, so replacing cat also changes category. Include a space or punctuation in the search if you want whole words only. What sort of text do you clean up most, and which matching option is missing for you?

Popular calculators

All Calculators