Find and Replace

Find and replace text online with optional regex support. Free browser-based text search and replace tool - no signup.

๐Ÿ”’ Your text stays in your browser - nothing is sent to our servers
Input Text
0Characters
0No spaces
0Words
0Sentences
0Lines
< 1 minRead time
Result
How to Use

Three steps to get started

1

Paste your text

Paste the text you want to search and replace within.

2

Enter find & replace

Type what to find and what to replace it with. Enable regex for patterns.

3

Copy the result

The match count and result update live. Click Copy when done.

About This Tool

Browser-based find & replace with regex support

Find and replace is a text operation that locates every occurrence of a search string - or every substring matching a regular expression - and substitutes it with replacement text. It is the same primitive behind sed -i, VS Code's Ctrl+H panel, and Word's replace dialog, minus the install and the file. Paste, transform, copy.

Literal mode treats your search string as plain characters, soa.b matches only the three-character sequence a.b. This is what you want the majority of the time and it removes the risk of a stray metacharacter silently changing the match set.

Regex mode compiles the Find field as a JavaScript regular expression (the same engine your browser runs), which unlocks pattern classes, quantifiers, anchors, alternation, lookahead and lookbehind, and capture-group references in the replacement. A few patterns that solve common cleanup jobs:

  • \s+ โ†’ a single space - collapse runs of whitespace from a bad paste
  • ^\d+\.\s* โ†’ empty - strip leading list numbering (needs multiline-aware input)
  • (\w+)@(\w+\.com) โ†’ $1 [at] $2 - obfuscate email addresses using capture groups
  • (\d{4})-(\d{2})-(\d{2}) โ†’ $3/$2/$1 - reorder ISO dates to day/month/year
  • [^\x00-\x7F] โ†’ empty - drop every non-ASCII character before a legacy import

Gotchas worth knowing

Regex is greedy by default. <.+> against<b>hi</b> swallows the entire string, because +takes as much as it can and backtracks only as needed. Add ? to make it lazy:<.+?>. Dollar signs are special in the replacement field.$1 means "first capture group" and $& means "the whole match", so to insert a literal dollar sign you must write $$.Escape your metacharacters. In regex mode, .,*, +, ?, (, [,{, ^, $, | and \ all carry meaning - a plain . matches any character, which is why replacing "3.5" can also rewrite "3x5".

The controls are deliberately small: case-sensitive or case-insensitive matching, replace every occurrence or only the first, and a live match count that updates as you type so you can validate a pattern before trusting the output. Because everything is computed in the page there is no upload step and no size ceiling - you can run a regex over a whole exported CSV, a log dump, or a manuscript, and confidential text never touches a server.

FAQ

Frequently Asked Questions

Related Tools