Skip to content

Find and Replace

Find and replace text with case and whole-word options.

Runs entirely in your browser. Nothing you type is sent to a server.
Running locallyText Tools
0 replacements
Result

Your result will appear here.

Short answer

This finds and replaces text with optional case-sensitive and whole-word matching, reports how many replacements were made, and runs entirely in your browser. It deliberately uses literal string matching rather than regular expressions, which makes it predictable: characters like . * ( ) and ? are treated as themselves rather than as pattern syntax, so searching for a price or a file path does what you expect. Whole-word matching is the option that prevents the classic mistake — replacing "cat" without turning "category" into "dogegory" — by requiring a word boundary at each end. Matches are counted non-overlapping and left to right, and the count updates live so you can confirm the number looks right before copying. The deliberate limitation is that there is no pattern matching: you cannot replace "any number" or "any whitespace run" here, which needs a regex-capable editor.

Overview

About the Find and Replace

Find any word or phrase in a block of text and replace it with another — instantly. Toggle case-sensitivity and whole-word matching, see exactly how many replacements were made, and copy the cleaned result with one click.

Procedure4

How to use the Find and Replace

  1. 01Paste your text into the editor.
  2. 02Type the text you want to find, then what to replace it with.
  3. 03Toggle case-sensitive or whole-word matching if you need them.
  4. 04Review the count of replacements and click "Copy" to grab the result.
Capabilities4

Why use our Find and Replace

  • 01

    Case-sensitive toggle

    Match exact casing when you need it, or ignore case for broad search-and-replace.

  • 02

    Whole-word matching

    Avoid partial-word hits — replace "cat" without touching "category".

  • 03

    Replacement counter

    See exactly how many matches were replaced after every change.

  • 04

    Safe & private

    Runs entirely in your browser using safe string matching — no regex injection, no upload.

Detail

Why literal matching instead of regular expressions

Regular expressions are powerful and are the wrong default for a general-purpose replace tool. In a regex, a full stop matches any character, parentheses create capture groups, and characters such as * + ? [ ] { } | ^ $ all carry special meaning. That means searching for 'v1.2.3' with regex enabled also matches 'v1x2y3', and searching for '(draft)' fails entirely unless the parentheses are escaped. For the overwhelming majority of find-and-replace tasks — swapping a name, updating a URL, fixing a repeated typo, changing a product term across a document — literal matching is what the user actually wants, and it removes an entire category of surprising results. It also removes a class of denial-of-service risk from pathological patterns. If you genuinely need pattern matching, a code editor or a command-line tool is the right instrument; this is built for the common case, and it does that case without caveats.

Detail

Whole-word matching and the substring trap

The most common way a bulk replace goes wrong is matching inside longer words. Replacing 'cat' with 'dog' across a document also turns 'category' into 'dogegory', 'concatenate' into 'condogenate' and 'located' into 'lodoged' — damage that is easy to introduce and tedious to find afterwards. Whole-word matching solves this by requiring the match to be bounded by a non-word character or the start or end of the text, so 'cat' matches the standalone word and leaves the longer words alone. It is worth turning on by default for anything where the search term is a short common word or a fragment that appears inside other words, and turning off when you specifically intend to match inside words — replacing a URL fragment, changing part of a file path, or updating a prefix. The replacement counter is the safety net for both cases: if the number is much higher than you expected, the search term is matching somewhere you did not intend.

Detail

Case sensitivity and preserving the original capitalisation

Case sensitivity determines whether 'Apple' matches 'apple'. Turning it off is useful when you want to catch every occurrence of a term regardless of how it was capitalised, which is common when cleaning up inconsistent writing. There is a limitation worth stating plainly: case-insensitive matching finds every variant, but the replacement is inserted exactly as you typed it, so replacing 'colour' with 'color' case-insensitively turns 'Colour' at the start of a sentence into 'color' in lower case. There is no smart-case behaviour that preserves the original capitalisation. The practical workaround is to run two case-sensitive passes — one for the capitalised form and one for the lower-case form — which takes a few extra seconds and produces correct output. Check the replacement count after each pass; together they should account for every occurrence, and a shortfall usually means a variant you did not anticipate, such as an all-caps heading.

Reference6

Option settings for common tasks

TaskCase sensitiveWhole word
Replace a person's nameOnOn
Fix an inconsistently capitalised termOffOn
Update part of a URL or pathOnOff
Change a short common wordOffOn
Replace an all-caps acronymOnOn
Swap a code identifierOnOn

When replacing case-insensitively, the replacement is inserted exactly as typed — run two case-sensitive passes to preserve capitalisation.

Questions9

Frequently asked questions

Does this support regular expressions?

No, deliberately. The search field is treated as literal text, so characters like . * ( ) and ? match themselves. That makes results predictable for ordinary replace tasks.

What does whole word mean?

The match must be bounded by a non-word character or the start or end of the text. With it on, searching 'cat' will not match inside 'category'.

Why did my replace corrupt other words?

Whole-word matching was off and the search term appeared inside longer words. Replacing 'cat' without it turns 'category' into 'dogegory'.

How is the replacement count calculated?

It counts every successful non-overlapping match replaced, and updates live as you change the find, replace or option fields. A surprising number usually means an unintended match.

Does case-insensitive replace preserve capitalisation?

No. The replacement is inserted exactly as typed, so 'Colour' becomes 'color'. Run two case-sensitive passes if capitalisation matters.

Can I replace across multiple lines?

Yes. The whole text is treated as one string, so a search term spanning a line break matches if you include the break in the field.

Is there a length limit?

No imposed limit. Processing is local, so long documents are handled comfortably.

What if I need pattern matching?

Use a code editor or a command-line tool. This is built for the common literal case, which is what most replace tasks actually need.

Is my text uploaded anywhere?

No. All searching and replacing happens locally in your browser.

Last updated

Word-boundary semantics follow the Unicode Standard Annex 29 definition of word boundaries as implemented by the JavaScript string APIs.