Text Find and Replace
When a client renames their product halfway through a draft, or you need to swap every placeholder {FIRST_NAME} in an email template, opening a word processor for three hundred replacements is overkill. Paste the text, set your find-and-replace pair, toggle case sensitivity or regular-expression mode, and this tool rewrites every hit and shows a counter of how many matches it swapped.
How to find and replace text
-
1
Paste the text
An article, template, log file or any plain string.
-
2
Enter the pattern to find
A literal word or phrase, or a regular expression when the regex toggle is on.
-
3
Enter the replacement
Leave it blank to delete matches; in regex mode reuse capture groups like $1, $2.
-
4
Pick options
Toggle case-sensitive matching, and regex mode for advanced searches.
-
5
Replace and copy
See the match count and copy the rewritten text in one click.
Option cheat sheet
| Option | What it changes |
|---|---|
| Case-sensitive | Apple matches only Apple, not apple or APPLE (applies to plain, non-regex searches) |
| Regular expression | The find field is read as a PCRE pattern, wrapped in delimiters such as /pattern/ |
| Inline flags | Add flags after the closing delimiter: i ignores case, s lets . match newlines, m makes ^ and $ match at line breaks |
| Replace all | Every match is replaced; there is no “first match only” mode |
Useful regex patterns
- Strip HTML tags:
/<[^>]+>/ - Collapse multiple spaces:
/ {2,}/to a single space - Remove URLs:
/https?:\/\/\S+/ - Mask phone numbers:
/\d{3}-\d{3}-\d{4}/to***-***-**** - Smart quote to straight quote:
/[‘’]/to' - Capture first word of each line:
/^(\w+).*$/mto$1
Capture groups save time
In regex mode, parentheses capture the matched portion and $1, $2 reuse them in the replacement. To swap first and last names in a CSV column:
- Find:
/(\w+),\s*(\w+)/ - Replace:
$2 $1
Common pitfalls
- Missing delimiters. In regex mode the pattern must be wrapped, for example
/foo/. Without delimiters the search fails and the text comes back unchanged. - Greedy matches.
/<.+>/eats everything from the first<to the last>on a line. Use/<.+?>/for lazy matching. - Special characters.
.,+,*,?,(,),[,],\,|,^,$are regex operators. Escape them with a backslash when you want the literal character. - Case toggle in regex mode. The case-sensitive toggle applies to plain searches; in regex mode control case with the
iflag instead. - Backreferences in the replacement. Reuse a group with
$1or${1}. To output a literal$before a digit, escape it as\$. - Newlines. Windows
\r\nand Unix\nlook identical on screen; a mismatch breaks line-end patterns.
Frequently Asked Questions
PCRE (Perl-Compatible Regular Expressions), the engine PHP, Perl and grep -P share. Wrap your pattern in delimiters such as /pattern/ and add flags like i or s after the closing delimiter. A few JavaScript- or Python-only shortcuts may not translate directly.
Thousands without any issue. Very large inputs are limited by the request size and processing time; for huge files use a command-line tool like sed or an editor with a streaming replace.
Not inside the tool. Keep the original text in another tab, or paste it into a versioned editor first so you can roll back.
The find-and-replace runs on our server: your text is submitted to perform the replacement and is not stored after the response. For confidential material, prefer an offline editor.
Related Tools
Meme Text Generator
Add classic meme captions to a template or your own image. Set top and bottom text, tune font, color and stroke, then download or copy a PNG.
Word Counter
Count words, characters, sentences and paragraphs with reading time, speaking time, keyword density and a Flesch readability score for essays, posts, captions and meta descriptions.
Password Generator
Generate strong random passwords with adjustable length, symbols, numbers and mixed case using cryptographic randomness.
Emoji Kitchen
Try verified Google Emoji Kitchen sticker pairs, download PNGs, and get supported suggestions when a pair is not in the curated set.
Glitch Text Generator
Create Zalgo-style glitch text with Unicode combining marks. Choose intensity, preview variants and copy corrupted text for profiles, memes or horror posts.
Wingdings Translator
Turn Latin letters and digits into Wingdings-style Unicode symbols for puzzles, jokes and retro Windows notes.
Tool available in other languages
- Znajdź i zamień tekst [PL]
- Text suchen und ersetzen [DE]
- テキスト検索・置換ツール [JA]
- Tìm và thay thế văn bản [VI]
- Buscar y reemplazar texto [ES]
- Tekst zoeken en vervangen [NL]
- 텍스트 찾기 및 바꾸기 [KO]
- Cari dan Ganti Teks [ID]
- Sök och ersätt text [SV]
- البحث والاستبدال في النص [AR]
- ค้นหาและแทนที่ข้อความ [TH]
- Localizar e substituir texto [PT]
- Rechercher et remplacer du texte [FR]
- Trova e sostituisci testo [IT]
- Поиск и замена текста [RU]
- Metin Bul ve Değiştir [TR]
- 文本查找和替换 [ZH]