Find and Replace Text
Replace words everywhere at once, with regex if needed.
Your text stays in your browser. Nothing is uploaded.
More Text Tools
All tools- Remove extra spacesCollapse double spaces and trim lines
- Remove line breaksJoin lines into one paragraph
- Remove empty linesDelete blank lines from text
- Remove duplicate linesKeep only unique lines in a list
- Word counterCount words, characters and reading time
- Character counterCharacters with and without spaces
- Case converterUpper, lower, title, sentence case and more
- Text compareFind the differences between two texts
- Title case converterHeadlines in AP or Chicago style
How to use the find and replace
Three steps, all in your browser.
- 1
Add your text
Type, paste or open a .txt file. Press Sample to try an example.
- 2
Choose what to fix
Switch options on or off. The cleaned text updates as you go.
- 3
Copy or download
Copy the result in one click or save it as a .txt file.
Find and Replace Text: what to know
Find and Replace changes every occurrence of a word or phrase in your text at once and shows how many matches it found. The result updates as you type the search and the replacement.
Matching ignores case unless you turn on 'Match case', and 'Whole word' skips matches inside longer words, so replacing 'cat' leaves 'category' alone. In plain mode the search and the replacement are taken literally, symbols included.
Turn on 'Regex' for regular expressions in JavaScript syntax. Use groups and $1, $2 or $<name> in the replacement, $& for the whole match, and \n or \t for a line break or tab. ^ and $ match at the start and end of each line. If the pattern is invalid, the error is shown and your text is left unchanged.
Popular uses
- Renaming a person, product or term throughout a document
- Fixing a repeated typo or outdated link
- Reformatting dates and phone numbers with regex groups
- Turning lists into comma-separated values and back
Tips for the best result
- Check the match count before copying, to make sure you're changing what you expect.
- Use 'Whole word' for short words that appear inside other words.
- In regex mode, escape special characters such as . ( ) and ? with a backslash when you mean them literally.
Read how JustYourText works and our privacy details. Text you type or paste is processed in your browser and is never sent to our server.