Find and replace text
Find literal text and replace the first, last or every occurrence.
How it works
Matching is exact and non-overlapping by default. Optionally ignore case for ASCII letters A–Z only. Enter a nonempty search string and optional replacement. An empty replacement deletes matches. No regular expressions or special replacement tokens are interpreted. The total count includes all matches, even when replacing only the first or last match. Text fields normalize line endings to LF; other whitespace is preserved.
Copy replacement summary
Copy replacement summary exports the current Matches and Replaced counts as tab-separated Metric and Value columns, without copying your text. For red apple, red apple, apple, finding apple and replacing it with pear gives 3 matches and 3 replaced in All matches mode; First or Last match gives 3 matches and 1 replaced.
Literal replacement example
Find apple in apple apple and replace it with pear. Replace all produces pear pear; replace first produces pear apple; replace last produces apple pear. With Ignore ASCII letter case enabled, finding apple in Apple APPLE apple matches all three spellings. Accented letters remain distinct: É does not match é. Characters such as dollar signs and periods are ordinary text.
How matches are counted
Matches are scanned from left to right without overlap. Finding aa in aaa matches only the first two characters, even in Last match mode. Replacements are literal, and unmatched text retains its original spelling. ASCII case matching does not normalize accents or apply Unicode case folding. The tool processes text in your browser without uploading or storing it.
Source limit: 50,000 UTF-16 units; find and replacement limits: 2,000 units each; result limit: 100,000 units. Related: Whitespace cleaner · Remove duplicate lines · Add prefix and suffix to lines.