Occurrences
2
Help Us Improve
—
(—)
Find and replace online
Find and replace text online with normal, extended, or regex mode. Match case, whole words, count occurrences, then copy or download.
What is find and replace online?
Find and replace features
Instant replace
Output and occurrence count refresh as you edit text or options.
Normal, extended, and regex
Literal search, escape sequences, or regular expression patterns.
Case and whole-word matching
Toggle case sensitivity and whole-word-only matching.
First match only
Replace the first occurrence without changing later matches.
Occurrence counter
See how many matches were found in the input text.
Copy and download
Export replaced text as plain text in one click.
How to search and replace text
Paste your text
Enter the content you want to search in Original text.
Set search and replace
Fill Search for and Replace with, then pick mode and matching options.
Copy or export
Review occurrences, then use Copy all, Download text, or Open in new tab.
Tips for search and replace
- 01
Start in normal mode
Use literal matching first before switching to regex.
- 02
Check the occurrence count
Confirm how many matches exist before copying output.
- 03
Use whole word for terms
Prevent partial replacements inside longer words.
- 04
Try extended for newlines
Search for \n or \t when replacing line or tab characters.
- 05
Validate regex patterns
Invalid regular expressions show an error and leave input unchanged.
When to use find and replace online
Bulk word swaps
Change repeated terms across a pasted block in one pass.
Cleanup pasted logs
Replace tokens, prefixes, or markers in exported log text.
Regex cleanup
Use patterns to normalize spacing, punctuation, or line formats.
Case fixes
Swap specific strings with case-sensitive or insensitive matching.
Quick QA edits
Test replacement rules on sample text before using them elsewhere.
Why use this find replace tool
Immediate
No run button required for standard use.
Flexible modes
Literal, extended escapes, and regex in one interface.
Private
All processing stays in the browser.
Portable output
Copy, download, or open output in a separate tab.
Technical details
- Input format
- Plain text with Unix or Windows line endings.
- Normal mode
- Treats search and replace values as literal strings.
- Extended mode
- Parses \n, \r, \t, \b, and \\ escape sequences before matching.
- Regex mode
- Uses JavaScript regular expressions with optional multiline matching.
- Runtime
- Client-side in modern browsers.
Sources & References
“The String.replace() method can accept a string or regular expression as the search pattern and a string or function as the replacement, enabling both literal and pattern-based text substitution.”
JavaScript String.replace() and regular expressions: Normal mode uses literal string replacement. Regex mode uses JavaScript RegExp patterns with support for capture groups in the replacement. Extended mode parses escape sequences before matching. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
“Regular expressions provide a powerful pattern-matching language for searching and replacing text based on character classes, quantifiers, groups, and anchors.”
Regular expressions for text pattern matching: In regex mode, the search pattern is compiled as a RegExp with optional case-insensitive and multiline flags. An occurrence counter reports how many matches exist before replacement. developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
“Escape sequences such as \n (newline), \r (carriage return), \t (tab), and \\ (backslash) allow representing non-printable characters in search and replace strings.”
Escape sequence parsing for extended replacement: Extended mode parses common escape sequences before performing replacement, enabling users to search for or replace with newline, tab, and other control characters. en.wikipedia.org/wiki/Escape_sequence