Find and Replace Text Online
About this tool
About Find and Replace
Change every occurrence of a word, a phrase or a pattern without opening an editor. Add as many find-and-replace rules as you need: they run in order, top to bottom, so you can rename a product, fix a recurring typo and reformat dates in one pass, and each rule shows how many hits it had. Plain-text mode treats every character literally, so a dollar sign or a full stop is just that. Match case and Whole words keep cat from matching Category, and Keep case writes Dog where the text had Cat and DOG where it had CAT. Switch on Regex for patterns with groups: $1 and $<name> insert captured text, and \n or \t in the replacement add a new line or a tab, which makes turning a list into comma-separated values a one-liner. A preview lists the matches of the first rule with their line numbers before you copy anything. With your own AI key, describe a change in words and get a tested rule. Your text stays in your browser.
Built and maintained by Abhi JainUpdated
How to Find and Replace Text
- 1
Paste your text
Paste into the Text box or open a file. Click Sample to try it.
- 2
Add rules
Type what to Find and what to Replace with. Click Add rule for more; rules run from top to bottom.
- 3
Set the options
Tick Regex, Match case, Whole words or Keep case. Check the hit counts and the Matches list.
- 4
Copy the result
Copy or Download the Result, or click Use as input to run more rules on it.
Find and Replace: questions and answers
How do I replace line breaks with commas?
Tick Regex, put \n in Find and , (comma and space) in Replace with. To do the opposite, find , and replace with \n. The Text Cleaner can also join lines with any separator.
How do I swap or reorder parts of a match?
Use groups in Regex mode. Find (\w+), (\w+) and replace with $2 $1 to turn "Smith, John" into "John Smith". Named groups work too: (?<year>\d{4}) is inserted with $<year>.
What does Whole words do?
It only matches when the text isn't part of a longer word: replacing cat leaves category and concatenate alone. It works for accented and non-Latin letters as well, unlike a plain \b in many editors.
Can AI write the pattern for me?
Yes, if you connect your own AI key. Describe the change, for example "change dates from 2026-12-03 to 03/12/2026". A sample of your text is sent to your provider, the pattern that comes back is checked to compile, and you review the hit count before using it. Without a key, everything else works the same.
Is there a limit on text size?
There is no fixed limit; very large text depends on your device's memory. A few megabytes of text is usually replaced quickly, while very complex regex patterns on huge files can take a moment.
Related Tools
- Regex TesterTest JavaScript regular expressions live with highlighted matches, capture groups, replace preview and plain-English errors.
- Text CleanerRemove duplicate and empty lines, extra spaces, line breaks, HTML tags, curly quotes and invisible characters in one pass.
- Sort LinesSort lines alphabetically, naturally, by number or by length; reverse or shuffle them, and remove duplicates.
- Case ConverterConvert text to camelCase, snake_case, kebab-case, Title Case and 10 more at once.
- Diff CheckerCompare two texts by line, word or character, side by side or unified, with ignore options, stats and a downloadable patch.