Find and Replace Text Online

Paste text, enter find and replace values, choose options, then copy the result.

Regex Case-sensitive Whole-word Live preview Match highlighting

Text & Settings

Runs in your browser No upload Works offline after loading Supports large text Undo available
0 characters · 0 words · 0 lines
Leave empty to remove matches.
Matches exact uppercase and lowercase letters.
Avoids replacing inside longer words.
Treats the find field as a JavaScript pattern.
Updates the result while you type.
Regex help and examples
Whole word boundary
\bword\b finds word but not sword.
Alternation
cat|dog finds either cat or dog.
Remove repeated spaces
Find [ \t]{2,}, replace with one space.
Swap "Last, First"
Find ([^,]+),\s*(.+), replace with $2 $1.
Replacement groups
Use $1, $2, and later groups from your pattern.
0 matches 0 replacements

Result

Match preview

Paste text and enter a find value to preview matches.

Tip: Ctrl/Cmd + K focuses the text box. Ctrl/Cmd + Enter repeats the last replace.

Advertisement

Understanding Text Replacement

Need to swap one word for another, fix a repeated typo, or clean a long list of items quickly? This text replacement tool gives you a simple, browser-based way to find specific words or phrases and replace them with new text in seconds. Your original stays unchanged until you explicitly choose to replace the input with the result.

What “find and replace” means

Think of text replacement as a smart search that can rewrite what it finds. You tell the tool what to look for (the “Find Text”) and what to insert instead (the “Replace With”). The tool scans your original text, locates matching characters, and swaps them based on your chosen option. If you leave the replacement field empty, the tool simply removes the found text. This makes it useful for deleting unwanted words, extra punctuation, or stray characters.

How to find and replace text online

  1. Paste your content into the Original text box.
  2. Enter the exact word, phrase, or regex pattern you want to find.
  3. Type the replacement text, or leave it blank to remove matches.
  4. Choose options and review the highlighted matches plus editable result.
  5. Copy, download, or replace the input with the result when ready.

Replacement options explained in plain language

  • Replace All: Writes every replacement into the result box while keeping your original unchanged.
  • Replace First: Replaces only the first match in the result.
  • Find Next / Previous: Moves through highlighted matches so you can review coverage.
  • Case sensitive: When enabled, “Apple” and “apple” are treated as different text.
  • Whole word: Prevents short searches from changing the middle of longer words.
  • Regex: Enables JavaScript-style patterns and replacement groups such as $1 and $2.

Everyday use cases

Writers fix repeated spelling mistakes or swap names in drafts. Teachers and students clean up assignments by replacing outdated terms. Marketers update product names in newsletters. Data teams adjust lists before importing into spreadsheets or CRM tools. Developers tidy configuration files and placeholder text.

Practical examples and safety notes

Preview before applying

Use live preview and highlighting to confirm every match before replacing the original input.

Safer edits

Use whole word for short terms

Searching for in without whole-word matching can affect words like mint or inside.

Boundary checks

Remove text intentionally

Leaving the replacement blank deletes matches from the result. Check the count so you know how many removals happened.

Blank replacement

Escape regex characters

If regex is on, characters like ., *, ?, and parentheses have special meaning.

Pattern safety

Use groups for structured edits

Regex captures can reorder text, such as changing Doe, John into John Doe with $2 $1.

Capture groups

Before and after examples

TaskFindReplace with
Fix a repeated typorecievereceive
Replace commas with new lines,\s* with Regex ona line break
Remove duplicate spaces[ \t]{2,} with Regex onone space
Swap name order([^,]+),\s*(.+) with Regex on$2 $1

FAQ

How do I replace text online?

Paste your original text, enter the text to find, type the replacement value, choose any options, then review and copy the result.

Can I remove text by leaving replacement blank?

Yes. Leave the replacement field empty and the tool removes each match from the result.

Is my text uploaded?

No. The replacement runs in your browser, so your text is not uploaded to a server.

How does case-sensitive matching work?

When case sensitive is enabled, uppercase and lowercase letters must match exactly. When it is off, Apple and apple can match the same search.

How does whole-word matching work?

Whole-word matching avoids replacements inside longer words, so searching for in does not change mint or inside.

Is regex supported?

Yes. Turn on Regex to use JavaScript regular expressions and replacement groups such as $1 and $2.

How do I replace line breaks or tabs?

Turn on Regex and search for \n to match line breaks or \t to match tabs. You can also paste a line break directly into the replacement field.

Why did my regex pattern fail?

Regex patterns can fail when brackets, slashes, or groups are incomplete. Check the status message, escape literal special characters, or turn Regex off for plain text search.

Explore more tools