T

Text Machine

Powerful text tools, in your browser

Find and Replace Text

Quickly find and replace words or patterns in your text.

Your Text
Find

Find

Replace with

Result

Matches Found: 0

Replacements Made: 0

How to use Find and Replace Text

  1. 1

    Paste your text

    Enter or paste the document or code you want to edit into the text area.

  2. 2

    Enter find and replace terms

    Type the word or pattern to search for in the Find box and what it should become in the Replace with box, which can be left empty to delete matches.

  3. 3

    Set matching options

    Turn on Case Sensitive, Whole Word Only, or Use Regular Expression to control exactly which occurrences are matched.

  4. 4

    Replace and copy

    Click Replace All to apply the changes, check the matches and replacements count, then copy the result.

Frequently asked questions

Does it support regular expressions?
Yes. Enable Use Regular Expression to search with regex patterns, including capture groups, character classes, and anchors. If the pattern is invalid, the tool warns you so you can fix the syntax.
How does Whole Word Only work?
With Whole Word Only enabled, the tool only matches your term when it stands alone, so searching for cat will not change words like category or scatter.
Can I delete text instead of replacing it?
Yes. Leave the Replace with field empty and every match of your search term will simply be removed from the text when you click Replace All.
How do I know how many changes were made?
After each run the tool displays the number of matches found and replacements made, so you can confirm the edit affected exactly as much text as you expected.
Is my text kept private?
Yes. All find-and-replace processing happens locally in your browser and nothing is uploaded to a server, so it is safe for private documents and source code. The tool is free with no registration.

Related tools

Keep going with these handy tools

Case Converter

Capitalize First Letter

Capitalize Each Word

Title Capitalization Tool

Remove Extra Whitespaces

Convert Tabs to Spaces