How to find and replace text
- Paste your text into the big box.
- Type what to find and what to replace it with. Matches are counted and highlighted as you type.
- Press Replace all. Changed your mind? Undo restores the previous version.
- Copy the result.
Handy recipes
| To do this | Find | Replace | Mode |
|---|---|---|---|
| Remove blank lines between paragraphs | \n\n | \n | Plain |
| Turn a list into one comma-separated line | \n | , | Plain |
| Collapse repeated spaces | {2,} | Regex | |
| Strip hashtags but keep the word | #(\w+) | $1 | Regex |
| Swap “First Last” to “Last, First” | ^(\w+) (\w+)$ | $2, $1 | Regex |
| Delete everything in [brackets] | \[[^\]]*\] | (empty) | Regex |
About regex mode
Regex mode uses JavaScript regular expressions with the multiline flag on, so ^ and $ match at the start and end of each line. Groups in parentheses are available as $1, $2…, named groups as $<name>, and $& is the whole match. In plain mode every character is literal, including $.
Cleaning up pasted text? The smart quotes converter fixes quotes and dashes, and the invisible character detector finds characters you can’t search for because you can’t see them.