Skip to content
Your text never leaves your browser

Find and Replace Text

Search. Replace. Done. Regex optional but encouraged.

What this does

Type what to find, type what to put in its place, click Replace All. Plain text search by default. Tick Regex when you need patterns, and tick Case sensitive if capital letters should matter. The number of replacements shows up next to the button, so you know whether you hit 3 things or 300.

Common use cases

Renaming something everywhere. The company changed its name, the character in your draft needs a new one, the product got rebranded for the third time. One pass.

Cleaning up pasted text. Find [“”] with Regex on, replace with a straight quote, and curly quotes from a word processor are gone. Find {2,} (a space, then {2,}) and replace with one space to fix double spacing.

Reshaping data with regex. Find (\d{4})-(\d{2})-(\d{2}), replace with $2/$3/$1, and "Due 2026-11-10, paid 2026-12-01" becomes "Due 11/10/2026, paid 12/01/2026". Find <[^>]+> and replace with nothing to strip HTML tags.

Things to know

Literal mode means literal. Dots, dollar signs and brackets in the find box match themselves, and a dollar sign in the replace box stays a dollar sign.

Regex mode uses the JavaScript flavor and replaces every match. In the replace box, $1 and $2 insert capture groups, $<name> inserts a named group, $& inserts the whole match and $$ is a plain dollar sign.

Regex sees your text as one long string. ^ and $ match the very start and end of everything, not each line, and . won't match a line break (use [\s\S] when you need that). You can find line breaks with \n: replacing it with a comma and a space joins a list into one line.

The replace box is a single line and treats \n as a backslash and an n, so it can't add line breaks.

Regex runs in the background with a 3-second limit. A pattern that spirals out of control gets stopped with a timeout message instead of freezing your tab.

Privacy

Your text never leaves your browser. The search, the replace, the regex you rewrote four times. All of it stays on your machine.

Questions

How do I swap first and last names with a capture group?

Tick Regex. For lines like 'Lovelace, Ada', find (\w+), (\w+) and replace with $2 $1. Each pair of parentheses captures a chunk, and $1 and $2 put them back in whatever order you like, so you get 'Ada Lovelace'. One warning: \w only matches plain a to z, digits and underscores, so 'Ramírez, José' comes out as 'RamíJos rezé'. For real-world names, find ([^,\n]+), (.+) instead. That gives you 'José Ramírez' and 'Mary Ann Smith-Jones' intact.

How do I match whole words only?

There's no whole-word checkbox. Tick Regex and wrap the word in \b instead. Finding \bcat\b in 'cat concat cats Cat' and replacing it with dog gives 'dog concat cats dog', with the other two left alone. A plain literal search would have turned concat into condog.

Is it case sensitive?

Not unless you tick Case sensitive. By default, apple matches Apple, APPLE and apple. The replacement goes in exactly as you typed it, so all three become pear, lowercase. Tick the box when only one spelling should change.

Why did my regex put text between every letter?

Your pattern can match nothing at all, and an empty match counts. Something like x* matches zero x's at every position, so replacing it with a dash turns abc into -a-b-c-. Use + instead of * when you need at least one character.