Sign up free

Find and Replace Text

Set up several find-and-replace rules, see the result live, and copy it when it looks right.

About Find and Replace Text

Find and replace text in bulk when one change isn't enough: rename a product across a whole price list, swap old placeholders in a template, fix a name that's misspelled five different ways, or tidy up exported data before it goes into a spreadsheet. Add as many rules as you need. They run from top to bottom, and the result and the number of replacements update as you type.

Matching ignores capitals unless you tick Match case, and Whole words stops cat from changing inside category. Turn on Regular expressions for patterns, such as \d{4} for any four digits, and reuse captured groups in the replacement with $1, $2 and so on. It all runs in your browser, so documents never leave your device.

How to use Find and Replace Text

  1. 1
    Paste your text

    Paste into Input or open a text file.

  2. 2
    Add find and replace rules

    Fill in Find and Replace with. Click Add a rule to find and replace text in several ways at once.

  3. 3
    Choose matching options

    Tick Match case, Whole words or Regular expressions as needed.

  4. 4
    Copy the result

    Check the replacement count, then click Copy or Save.

Why use Cubfile for this

  • Multiple rules in one pass

    Chain as many find and replace pairs as you like, applied in order.

  • Whole-word matching

    Replace a word without touching longer words that contain it.

  • Regular expressions

    JavaScript regex with $1-style group references in the replacement.

  • Live count

    See how many replacements were made before you copy anything.

FAQ

Find and Replace Text: questions and answers

Can I find and replace text with regular expressions?
Yes. Tick Regular expressions and write the pattern in Find, then use $1 or $2 in Replace with to insert captured groups. The syntax is the one used by JavaScript. To try a pattern on sample text first, the Regex Tester highlights every match and group as you type.
Why were words with capital letters replaced too?
Matching ignores case by default. Tick Match case to replace only the exact capitalization you typed.
How do I find and replace text in a Word document?
This tool works on plain text. For DOCX, XLSX or PPTX files with their formatting intact, use Find and Replace in Word, which handles several Office files at once.
Do the rules run in order?
Yes, from top to bottom, and each rule works on the result of the one before. Put longer phrases first if a shorter rule would break them.
Is my document uploaded?
No. Everything runs in your browser and doesn't use your daily tasks, and the draft stays only in this browser.
Share Find and Replace Text with a friendIt runs in any browser, and they can try it without signing up.

Related tools

JSON JSON FormatterFormat, validate and minify JSON, errors pointed out by line.
TXT Text CleanerRemove extra spaces, empty lines and broken line breaks in one click.
TXT Text CompareCompare two texts side by side and see every change.
TXT Word CounterCount words, characters, Chinese characters, lines and reading time live.
TXT Base64 Encode and DecodeEncode and decode Base64 text and files.
AaTXT Case ConverterUPPER, lower, Title, Sentence, camelCase, snake_case and more.
TXT Password GeneratorMake strong random passwords on your device.
TXT Remove Duplicate LinesDelete repeated lines and sort what’s left.