Find and Replace

Every editor has find and replace. None of them show you what a replace-all is about to do. Here every match is highlighted in your own text as you type the search, so you can see the full extent of the change before you commit to it.

Your text0 chars
Result
Your result appears herePaste text on the left. It is processed in your browser and never sent anywhere.
01 · Why this exists

Replace-all is the edit nobody checks.

Find and replace is in every editor you own, so a page offering it needs a reason. This is the reason: your editor replaces first and tells you how many changes it made afterwards. A number is not a review. It tells you the scale of what happened and nothing at all about whether it was right.

That matters because bulk replace fails quietly. The wrong matches are scattered through a long document rather than concentrated in one place, they read as plausible text at a glance, and by the time anyone notices, the undo history has been gone for days. There is no single edit to reverse.

So here the matches are highlighted in your own text while you are still typing the search. You watch the highlighting, adjust until it selects exactly what you meant, and only then replace.

02 · How it goes wrong

Five ways a replace-all damages a document.

  • Matching inside longer wordsReplacing "cat" with "dog" turns catalogue into dogalogue and education into edudogion. This is the single most common bulk-replace mistake, it is invisible in a large document, and whole-word matching prevents it entirely.
  • Case you did not intendA case-insensitive replace of "apple" with "orange" turns Apple at the start of a sentence into orange, lowercase and mid-sentence. Case matching stops it, at the cost of needing a second pass for the capitalised form.
  • Names that contain other namesReplacing Johnson also hits Johnsons and johnson@example.com, and leaves Johnston alone even though it looks similar at a glance. Names are the classic case for reviewing the matches before committing, because the ones you want and the ones you do not are visually almost identical.
  • A pattern that matches more than you thinkRegular expressions are exact and unforgiving. A greedy quantifier will match from the first occurrence to the last rather than to the nearest, which on a document-wide replace can consume several paragraphs in a single match. Seeing what is highlighted before replacing is the only reliable check.
  • Discovering it laterThe reason all of this matters is that a bad replace-all is often noticed long after the undo history has gone. The damage is spread through the document rather than concentrated, so there is no single edit to reverse.
03 · Regular expressions

Five constructs that cover most of the work.

Regex is worth the trouble precisely because the matches are visible here. You can build a pattern by watching what it selects rather than by reasoning about it.

Alternatives

A vertical bar separates alternatives, so a pattern of colour|color matches either spelling in one pass. Wrapping alternatives in a group keeps them together when the pattern continues.

Character classes

Square brackets match any one of the characters inside them, and a leading caret inverts that. Shorthand classes cover the common sets: digits, word characters and whitespace each have one.

Quantifiers

A plus sign means one or more, an asterisk means zero or more, and braces give an exact count or a range. All of them are greedy by default, matching as much as possible; adding a question mark makes them lazy and match as little as possible, which is usually what you actually meant.

Anchors

A caret matches the start of the text and a dollar sign the end. Word boundaries are what the whole-word option uses, and they are worth knowing directly, since they let you anchor one end of a match without the other.

Capture groups

Round brackets capture what they match, and in the replacement a dollar sign followed by a number inserts that capture. This is how you reorder rather than merely substitute: swapping a name from last-comma-first into first-space-last is a single pattern with two groups.

04 · When replace is the wrong tool

Some things cannot be typed into a find box.

Find and replace can only look for something you can express. That rules out a whole category of problem: you cannot type a zero-width space into a search field, and you cannot reliably tell a non-breaking space from an ordinary one by looking at either. Those need a tool that knows the code points, which is what the zero-width space remover is for.

Whitespace generally is easier to handle by rule than by pattern. Trailing spaces, doubled gaps and stacked blank lines each need their own search, and the AI space remover applies all of them at once. Dashes are the same story: there are six characters that look like a dash, and the dash replacer knows all of them.

For AI-written drafts the whole set usually applies at once, which is what the ChatGPT text cleaner is for, and the ChatGPT watermark remover reports the hidden characters by name so you know what was there rather than only that something was.

05 · FAQ

Find and replace questions.

Why use this instead of the find and replace in my editor?

Because it shows you every match highlighted in your own text before anything is replaced. Editors replace first and report a count afterwards, which tells you how many changes were made but not what they were. On a bulk replace across a long document, seeing the matches is the difference between a clean edit and one you discover was wrong a week later.

How do I replace only whole words?

Turn on whole words. It wraps your search in word boundaries, so cat matches the word cat and not catalogue or education. This is the option that prevents the most common bulk-replace mistake, and it is worth turning on by reflex whenever you are replacing a short word.

How do I make the search case sensitive?

Turn on match case. It is off by default, which is right for most searches, but a case-insensitive replace will happily turn a capitalised word at the start of a sentence into a lowercase one mid-sentence.

How do I use a regular expression?

Turn on regex and your search text is treated as a pattern rather than as literal characters. The matches update as you type, so you can watch the highlighting and adjust the pattern until it selects exactly what you intended before replacing anything.

Can I use capture groups in the replacement?

Yes, in regex mode. Round brackets capture, and a dollar sign followed by the group number inserts that capture into the replacement. This is how you reorder text rather than just substituting it, such as turning a list of surname-comma-forename into forename-space-surname.

What happens if my regular expression is invalid?

Nothing is highlighted and nothing is replaced. A pattern is invalid for most of the time you spend typing it, so an invalid pattern is treated as no matches rather than as an error that clears the pane.

How do I delete text rather than replace it?

Leave the replace field empty. Every match is removed and nothing is put in its place, which is the right way to strip a repeated phrase, a prefix, or a marker out of a document.

Does it replace all occurrences at once?

Yes. Every match in the text is replaced in one pass, and every one of them is highlighted first so you can see the full extent before committing.

Can I replace across line breaks?

Yes in regex mode, where a pattern can span lines. A literal search treats your search text exactly as typed, including any line break in it, so pasting a two-line phrase into the find field works as you would expect.

Is there a limit on document size?

No. Everything runs in your browser, so nothing is uploaded. Very large documents with many thousands of matches may take a moment to render the highlighting, since each match is marked individually.

Is my text uploaded anywhere?

No. Nothing is transmitted or stored. The text stays on your device and closing the tab discards it, which makes it usable on material you could not paste into a server-side tool.