Text Cleaner
Tidy messy pasted text: extra spaces, empty lines, breaks and special characters.
Swap one word or pattern for another across a whole document.
Leave empty to delete every match.
Find and Replace Text does in one step what you would otherwise do dozens of times by hand: locate every occurrence of a word, phrase or pattern in a block of text and swap it for something else. Paste the text, type what you are looking for and what should take its place, and the result appears below with a count of how many replacements were made.
Four switches control how matching works. Case-sensitive matching treats Cat and cat as different. Whole-word matching stops a search for cat from also hitting concatenate. Regular expression mode turns the search box into a pattern, so you can match things like any run of digits or any email address. Replace-first stops after the first hit when you only want to change the opening occurrence.
In regex mode you can use capture groups in the replacement with $1, $2 and so on, which is how you reorder parts of a line. Changing every date from day-month-year to year-month-day across a thousand rows takes one pattern rather than a thousand edits.
The find and replace text is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:
Type the word into the find box and leave the replace box empty. Every match is removed and the count tells you how many disappeared.
It requires a word boundary on each side of the match, so searching for cat changes the word cat but leaves concatenate and scatter untouched. Without it, any run of matching characters is replaced.
Wrap part of your pattern in brackets and refer to it in the replacement as $1 for the first group, $2 for the second and so on. Matching (\d{2})-(\d{2}) and replacing with $2/$1 swaps the two numbers around.
Usually an unclosed bracket or an unescaped special character. Characters such as a full stop, question mark, plus sign and brackets have meaning in a pattern, so a literal one needs a backslash in front of it.
No fixed limit. Replacement runs in your browser, so very large documents are handled by your device's memory rather than by a server quota.
No. The input box keeps what you pasted, so you can adjust the search and run it again from the same source as many times as you like.
If the find and replace text is not quite what you need, these other free tools solve closely related problems.
Tidy messy pasted text: extra spaces, empty lines, breaks and special characters.
Build and test regular expressions live, with highlighted matches and groups.
Add text to the start or end of every line, with optional numbering.
Deduplicate any list of lines, with case-sensitive and empty-line options.
Convert any text to UPPERCASE, lowercase, Title Case, Sentence case and more.