Skip to content

Find and Replace Text Online

Paste text or load a file, find every match with its line number, and replace one at a time or all at once. Regular expressions are supported for pattern-based edits.

Drop a text file here

Or paste straight into Raw Input below.

.txt, .csv, .log, .md, .json, .xml, .html, .js and .css files. Read on your device.

Find and replace

Matches update as you type. Replacements build on the current output.

Waiting for text
Ready. Paste text and search to begin.
StatusWaiting
Total Matches0
Current Match0 / 0
Replacements Made0
Input Characters0
Output Characters0
Output Search Hits0

Input & Replaced Output

Search in the original text and preview the edited result on the right.

No search issues Line 1, Col 1

Raw Input

Editable 0 chars
1
Ready for input Finder ready
No file loaded

Output Preview

Search preview 0 chars
1

No output yet 0 preview hits
Ready to download

Match Results

Each found result appears here with line number and context preview.

Search for something to see all matches here.

Result Snapshot

What changed between Raw Input and the output.

Snapshot idle
Input Lines0
Output Lines0
Words in Output0
Characters Changed0
Find Length0
Replace Length0
Regex ModeOff
Whole WordOff

Runs in your browser. Nothing you type, paste or open here is uploaded.

To find and replace text online, paste your text into Raw Input, type the word in Find and the new text in Replace with, then select Replace all. The edited text shows in Output Preview with a count of replacements made. Tick Case-sensitive, Whole word only or Regex mode for tighter matching.

How to find and replace text online

  1. Add your text. Paste into Raw Input, or select Select text file to load a .txt, .csv, .log, .md, .json, .xml, .html, .js or .css file.
  2. Search. Type in Find. Matches are found as you type and listed under Match Results with their line number and the words around them.
  3. Set the matching rules. Tick Case-sensitive to tell Hello from hello, Whole word only to skip partial matches, or Regex mode for patterns.
  4. Replace. Enter the new text in Replace with and select Replace all, or step through with Next match and Replace current.
  5. Save the result. Select Copy output or Download for a .txt file.

Replace words in text, one or all

Replace all changes every match in one go and adds the number to the Replacements Made counter. Replace current changes only the highlighted match, which is safer when the same word means different things in different places. Use Previous match and Next match to move through the list, or click any entry in Match Results to jump to it.

Each replacement works on the current output, so you can run several search and replace text passes in a row: replace colour with color, then organise with organize, and so on. Your original stays in Raw Input. If you edit Raw Input, the output resets to match it, so finish editing before you start replacing.

Case-sensitive and whole-word matching

By default the search ignores case, so apple also finds Apple and APPLE. Tick Case-sensitive to match exactly what you typed.

Whole word only stops partial matches. Without it, replacing cat with dog also turns category into dogegory. With it, only the separate word cat changes. Whole-word matching treats letters from any language, digits and underscores as parts of a word, so café and naïve are matched as whole words too.

Regex find and replace

Tick Regex mode to search with JavaScript regular expressions. The pattern is run with the global and Unicode flags (so \p{L} works), plus case-insensitive matching unless Case-sensitive is ticked. In Replace all and Replace current you can reuse captured groups with $1, $2 and $& (the whole match). Outside Regex mode the replacement is inserted exactly as typed, so a $ stays a $.

FindReplace withResult
(\d{4})-(\d{2})-(\d{2})$3/$2/$12026-10-11 becomes 11/10/2026
{2,}a single spaceCollapses runs of spaces
\bcolou?r\bshadeReplaces both color and colour
(\w+)@example\.com$1@example.orgMoves addresses to a new domain

A few things behave differently from some code editors. Whole word only works in Regex mode too: the whole pattern has to start and end at a word boundary. The multiline flag isn't set, which means ^ and $ match the start and end of the whole text, not each line. An invalid pattern shows an error badge instead of results. To build and debug a tricky pattern first, try the regex tester.

Common uses for a text replace tool

  • Renaming in a document. Swap a product or client name across a long contract or a set of notes before sending it.
  • Cleaning exported data. Change semicolons to commas in a CSV, or strip a prefix from every line of a log file.
  • Fixing spelling variants. Convert British to American spelling, or the other way round, one pair at a time.
  • Joining broken lines. In Regex mode, find \n and replace with a space. For more line and space cleanup in one step, use remove line breaks.

When you're done, the diff checker shows exactly what changed between your original and the edited version.

Frequently asked questions

How do I find and replace a word in text?

Paste your text, type the word in Find and the new word in Replace with, then select Replace all. Tick Whole word only if the word also appears inside longer words.

Can I use regular expressions?

Yes. Tick Regex mode to use JavaScript regex syntax. Replace all and Replace current support capture groups such as $1 and $2 in the replacement.

Is the search case-sensitive?

Not by default. The search matches upper and lower case alike until you tick Case-sensitive.

Can I undo a replacement?

There's no undo button, but your original text stays untouched in Raw Input. Editing Raw Input resets the output to match it, so you can start the replacements again.

Is my text uploaded?

No. Searching and replacing happen in your browser, and files you load are read on your device. Nothing is sent to ToolzyLab.

Are there keyboard shortcuts?

Yes. In Raw Input, Ctrl+Enter (Cmd+Enter on a Mac) runs Find matches. The tool also maps F3 and Shift+F3 to the next and previous match.

Updated 11 October 2026Reviewed by the ToolzyLab teamHow we test our tools