Advertisement
Text Tools

Find and Replace Text

Paste any text and find and replace words or phrases instantly. Match case or whole words only, use regular expressions with capture groups, and run dozens of replacement rules at once. Extra clean-up options trim lines, remove empty lines and collapse spaces.

  • Live preview
  • Bulk replacement rules
  • Regex with $1 groups
  • Whole word and match case
  • Runs in your browser

Runs in your browser. Nothing you type is sent to our server.

Result

      
    
Bulk rules: many find and replace pairs at once

One rule per line as find => replace. Rules run in order, after the single Find field above.

Advertisement
How to use

How to use the find and replace tool

  1. 1

    Paste your text

    Any length: a document, code, a CSV, a list of URLs.

  2. 2

    Enter Find and Replace

    Type what to find and what to put instead. Leave Replace empty to delete matches.

  3. 3

    Add bulk rules

    Open Bulk rules for many pairs, one per line as find => replace.

  4. 4

    Copy the result

    The result updates live with a count of replacements. Copy or download it.

Find and replace online

A find and replace tool for any text

Every word processor has find and replace, but it is often fiddly for quick jobs: text copied from a website, a list of product names, a CSV export, a block of code, or a template that needs the same changes every week. This online find and replace tool works on any text you paste, shows the result instantly beside the original and counts how many replacements were made.

Everything happens in your browser, so even long documents are processed instantly and nothing is uploaded.

Matching options

  • Match case: Apple will not match apple.
  • Whole words only: replacing cat will not change category or concatenate.
  • Understand \n and \t: type \n in Replace to insert a line break and \t for a tab, for example to turn a comma-separated list into one item per line.
Bulk find and replace

Many find and replace rules at once

The Bulk rules box takes one rule per line in the form find => replace. Rules run from top to bottom, after the single Find field, so you can build a reusable list and paste it in whenever you need it. Typical uses:

  • Converting British to American spelling (colour => color, organise => organize).
  • Updating a domain, brand name or product name across a whole document.
  • Replacing http:// with https:// in a list of links.
  • Normalising data before import: Yes => 1, No => 0.
  • Removing words or tracking codes by leaving the replace side empty.

Because rules run in order, a later rule can change text produced by an earlier one. Put more specific rules first.

Advertisement
Regex

Find and replace with regular expressions

Tick Regular expression to use JavaScript regex syntax in Find. Matches are global and Unicode aware. In Replace, use $1, $2 to insert captured groups and $& for the whole match.

Find (regex)ReplaceResult
(\w+)@(\w+)\.com$1 at $2ana@site.com becomes ana at site
\s+$(empty)Removes trailing spaces on the last line
(\d{4})-(\d{2})-(\d{2})$3/$2/$12026-11-05 becomes 05/11/2026
<[^>]+>(empty)Strips HTML tags
^- Adds a dash at the start (combine with line options)

If a pattern is invalid, the error message appears under the options and the text is left unchanged.

Clean up

Clean up lines and spaces

Four extra switches run after all replacements: Trim each line removes spaces at the start and end of lines, Remove empty lines deletes blank lines, Collapse double spaces turns runs of spaces and tabs into a single space, and Join lines into one merges everything into a single line, which is handy for text copied from PDFs.

Related tools: remove repeated lines with Remove Duplicate Lines, change capitalization with the case converter, compare before and after with text compare, and count the result with the word counter.

Examples

Find and replace examples

A few recipes that cover most everyday jobs:

GoalFindReplaceOptions
Comma list to one per line, \nUnderstand \n
One per line to comma list\n (regex), Regular expression
Wrap each line in quotes^(.*)$"$1"Regular expression (multi-line text works line by line)
Remove all numbers\d+(empty)Regular expression
Fix double spaces(none)(none)Collapse double spaces
Rename a product everywhereWidget ProWidget MaxWhole words only

For line-based regex patterns that use ^ and $, add the m behaviour by writing the pattern as (?:^|\n) where needed, or run the text through the line options first. When a pattern does something unexpected, test it on a short sample, check the replacement count shown above the result, then paste the full text.

Because the original text is never modified, you can experiment freely: the left box always keeps your input, and the result on the right is rebuilt from scratch on every change.

FAQ

Find and Replace Text: frequently asked questions

How do I find and replace text online?

Paste your text, type the word to find and its replacement, and the result appears instantly with the number of replacements made.

Can I replace several different words at once?

Yes. Open Bulk rules and enter one rule per line as find => replace. All rules are applied in order.

How do I delete a word from text?

Enter the word in Find and leave Replace empty.

Does it support regular expressions?

Yes. Tick Regular expression to use JavaScript regex, with $1, $2 for captured groups in the replacement.

How do I replace only whole words?

Tick Whole words only, so replacing cat will not change category.

How do I add a line break in the replacement?

Type \n in Replace with the Understand \n and \t option ticked.

Is there a size limit?

No fixed limit. It runs in your browser, so very large texts depend only on your device.

Is my text uploaded?

No. All processing happens in your browser and nothing is sent to our server.

About Text Tools

More about our text tools

Text tools for writers, editors, marketers and anyone cleaning up lists: change case, remove duplicate lines, compare two versions of a document, and generate placeholder copy.

Built for lists and long documents

These tools are designed for pasted lists of thousands of lines and full-length documents, not just a sentence or two. Line-based tools keep your original order unless you ask for sorting.

Unicode-aware

Case conversion, de-duplication and comparison use multibyte-safe functions, so accented letters, non-Latin scripts and emoji are handled correctly instead of being mangled.

Nothing is stored

Your text is processed for the current request only. Close the tab and it is gone.