Find and replace in text
Numbers & text
Paste your text, say what to find and what to put in its place. The number of matches is shown before you copy the result.
Runs in your browser
Nothing is uploaded. The work happens on your own device, so your file or text never reaches us.
About this tool
Regular expressions
Turn on regex and the search becomes a pattern. Capture groups are available in the replacement as $1, $2 and so on.
For example, finding (\w+)@(\w+)\.com and replacing with $1 at $2 rewrites email addresses into a form that will not be auto-linked.
The pattern runs in your browser’s own regex engine, so the syntax is JavaScript’s.
Questions
What does "whole words only" do?
It requires a word boundary either side, so replacing "cat" will not touch "category". It applies to plain-text search; with regex you write the boundaries yourself as \b.
Related tools
Clean whitespaceCollapse double spaces, trim lines, remove empty lines and line breaks, convert tabs, and strip the invisible Unicode spaces that text pasted from a PDF carries.Sort linesSort lines alphabetically, numerically, by length, in reverse or at random. Sorting is language-aware, so accented letters land where that language puts them.Regex testerTest a regular expression against text with live highlighting, named and numbered capture groups, and a replacement preview.