Find and Replace
Search your text and replace matches instantly, with support for match case, whole word, and regular expressions.
Search your text and replace matches instantly, with support for match case, whole word, and regular expressions.
Find and replace is the process of locating every occurrence of a word, phrase, or pattern in a block of text and swapping it for something else, without retyping the surrounding content by hand.
It is one of the oldest and most common text-editing operations, built into everything from word processors and code editors to command-line tools like sed and grep. The same idea applies whether you are fixing a misspelled name across a long document, renaming a variable in a script, or normalizing formatting in a data export.
This tool searches your text for every match of the term you enter and replaces it with the replacement text you provide, updating the content directly in the same box.
It supports three optional search modifiers: match case (so "Text" and "text" are treated differently), match whole word (so searching "cat" won't match inside "category"), and regular expressions (so you can search using patterns instead of literal text). A live match counter tells you how many occurrences were found before you commit to replacing them.
Paste or type your text into the input box, or click "Upload File" to load a .txt or .md file from your computer.
Type the text (or regular expression) you want to find into the "Find what" field. The match count below updates automatically.
Type what you want to replace each match with into the "Replace with" field. Leave it blank to delete matches entirely.
Toggle "Match case" for case-sensitive matching, "Match whole word" to avoid partial-word matches, or "Use regular expression" to search with a pattern instead of literal text.
Click "Replace All" to apply the replacement to every match at once. The text box updates in place and shows how many replacements were made.
Click "Copy Text" to copy the result to your clipboard, or use "Download" in the sidebar to save it as a .txt file.
By default, searching for "cat" will also match inside "category" or "concatenate". Turn on "Match whole word" if you only want standalone occurrences of the term replaced.
"Match case" is off by default, so searching for "Text" will also match "text" and "TEXT". Enable it if you need an exact-case match.
When "Use regular expression" is off, your search text is treated literally, so characters like "." or "*" are matched as themselves. Turning regex mode on changes how those characters behave — a lone "." will then match any character.
An incomplete or malformed pattern (like an unclosed bracket) will show an "Invalid regular expression pattern" message instead of a match count, and "Replace All" stays disabled until the pattern is fixed.
There is no single "replace next" step — clicking "Replace All" updates every match in the text immediately. Review the match count first if you want to confirm how many occurrences will change.
Replacing every occurrence of a word with another, case-insensitive by default.
Input
The quick brown fox jumps over the lazy dog. The dog barks.
Output
The quick brown fox jumps over the lazy cat. The cat barks.
Searching for "cat" with "Match whole word" on leaves "category" untouched.
Input
The cat sat near the category sign.
Output
The dog sat near the category sign.
Using a regex pattern to match any sequence of digits and replace it with "#".
Input
Order 4521 shipped on 2024, invoice 998.
Output
Order # shipped on #, invoice #.
Not by default. Enable "Match case" if you need "Text", "text", and "TEXT" to be treated as different strings.
Yes. Leave the "Replace with" field empty and click "Replace All" to delete every match from the text.
It only matches your search term when it appears as a complete word, not as part of a longer word. For example, searching "cat" won't match inside "category" when this is enabled.
When "Use regular expression" is enabled, your search text is treated as a JavaScript regular expression pattern instead of literal text, letting you match patterns like digits (\d+) or email addresses. You can also use capture groups in "Replace with" using $1, $2, etc.
The match count is replaced with an "Invalid regular expression pattern" message, and the "Replace All" button is disabled until you fix the pattern.
No. All searching and replacing happens locally in your browser. Your text is never sent to a server, so it's safe to use with sensitive or private content.
You can upload .txt or .md files. For Word documents or PDFs, open the file and copy the text as plain text into the input box instead.