for the whole match, \\n for a line break and \\t for a tab in the replacement."}}, {"@type": "Question", "name": "How do I replace line breaks?", "acceptedAnswer": {"@type": "Answer", "text": "Tick Regular expression, search for \\n and type the replacement, for example a space or a comma. For the common case, the remove line breaks tool has ready-made options."}}, {"@type": "Question", "name": "Is the search case sensitive?", "acceptedAnswer": {"@type": "Answer", "text": "Not by default. Tick Match case when capitals matter."}}, {"@type": "Question", "name": "Is my text uploaded anywhere?", "acceptedAnswer": {"@type": "Answer", "text": "No. All replacing happens in your browser; nothing is sent to a server or stored."}}]}
Free online tools
English EN, Choose a language

Find and replace

Paste your text, type what to find and what to put instead. Match case, whole words, regex or many rules at once.

Mode

Result

Paste your text, then type what to find. The result appears here.

Runs in your browser. Your text is never uploaded or stored.

Related tools

All text tools →

How to find and replace text online

  1. Paste your text into the box. Insert example loads a short letter.
  2. Type the text to find and what to replace it with. Leave the replacement empty to delete the match.
  3. Check the result on the right: the number of matches replaced is shown under it. Copy it or download it.

Replacements apply to every match in the text at once. Press Clear or edit the box to start again, and use Use as input to chain a second replacement on the result.

Match case and whole words

By default the search ignores capitals, so acme, Acme and ACME all match. Match case restricts it to your exact spelling. Whole words only avoids changing words that merely contain your text. Replacing cat with dog in cat concatenate Cat category:

SettingResult
Whole words onlydog concatenate dog category
Any matchdog condogenate dog dogegory

Without whole words, concatenate turns into condogenate and category into dogegory. The whole-word option counts letters, digits and the underscore as part of a word.

Many replacements in one pass

Switch to Many rules and write one rule per line as old => new. The rules run from top to bottom on the result of the one before. Changing British to American spelling:

The colour of my favourite grey car
The color of my favorite gray car

Because rules run in order, a later rule can change what an earlier one produced. Put the longer or more specific phrase first.

Regular expressions: patterns, groups and line breaks

Tick Regular expression to search with a pattern. In the replacement, $1, $2 and so on insert what the matching brackets captured, $& inserts the whole match, and \n and \t insert a line break and a tab. Turning the dates 12/03/2026 from day/month/year into year-month-day uses the pattern (\d{2})/(\d{2})/(\d{4}) and the replacement $3-$2-$1:

Dear {name}, your order #1234 ships on 2026-03-12.
Thanks, the team at Acme Inc. Acme loves you.

A pattern can also match a line break. Searching \n and replacing with / joins lines:

first line / second line / third line

The syntax is JavaScript's. A pattern that is not valid shows an error instead of changing your text. Patterns with nested repeats on very long text can be slow; if the page stops answering, shorten the text or simplify the pattern. For only joining lines, remove line breaks is easier.

Tips and pitfalls

Ready-made patterns to copy

Tick Regular expression, paste the pattern into Find and the replacement into Replace with:

JobFindReplace with
Delete trailing spaces on every line[ ]+$(empty)
Collapse repeated spaces {2,}one space
Squeeze blank lines into one {3,}
Put every line in quotes^(.*)$"$1"
Swap "Last, First" to "First Last"^(\w+), (\w+)$$2 $1
Remove all digits\d+(empty)

The pattern applies to the whole text with line anchors, so ^ and $ match at the start and end of every line.

Related tools

Find and replace FAQ

How do I find and replace text online?

Paste your text, type the word or phrase to find and the replacement, and the result is shown at once with the number of matches replaced. Copy it or download it.

How do I replace many words at once?

Choose Many rules and write one rule per line as old text => new text. The rules run from top to bottom.

How do I match whole words only?

Tick Whole words only. Then cat matches the word cat but not concatenate or category.

Does it support regular expressions?

Yes. Tick Regular expression to use JavaScript patterns, with $1 for captured groups, $& for the whole match, \n for a line break and \t for a tab in the replacement.

How do I replace line breaks?

Tick Regular expression, search for \n and type the replacement, for example a space or a comma. For the common case, the remove line breaks tool has ready-made options.

Is the search case sensitive?

Not by default. Tick Match case when capitals matter.

Is my text uploaded anywhere?

No. All replacing happens in your browser; nothing is sent to a server or stored.

Missing something in the find and replace?Suggest an idea. It takes 20 seconds and we read every one.Suggest an idea

Sends only what you type here, never the text you work with. Your email is used only to reply about this idea.

Free online tools