Ctrl+H (or Cmd+H on Mac) covers the common case: find a word in a document and replace it. But what about replacing text across a large block of data, a pasted keyword list, or a string that has a consistent pattern you want to transform? Online find and replace tools handle these cases faster than any text editor.

When Ctrl+H Isn't Enough

The built-in find and replace in Word, Google Docs, and Notepad works well for document editing. But several scenarios demand more:

  • Lists of data: You have a column of values (product names, URLs, keywords) that need a consistent substitution — you want to replace "US" with "United States" across 500 rows without opening a spreadsheet.
  • Text pasted from external sources: You've pasted content that uses the wrong quote style, wrong dash type, or wrong currency symbol — you need a quick clean-up pass.
  • Template filling: You have a block of boilerplate text with placeholders like [CLIENT_NAME] or [DATE] that you need to replace with real values.
  • Reformatting: You need to change a separator (tabs to commas, semicolons to newlines) across a large dataset.

Case-Sensitive vs. Case-Insensitive Replacement

This distinction matters more than people realize. Case-insensitive replacement catches more instances but can introduce wrong capitalizations:

  • Finding "apple" case-insensitively and replacing with "Orange" would convert "Apple" → "Orange", "APPLE" → "Orange", "apple" → "Orange" — incorrect capitalizations for the last two
  • Case-sensitive replacement: only exact-case matches get replaced, preserving capitalization patterns elsewhere

For most data cleaning tasks (standardizing codes, tags, or IDs), case-insensitive is correct. For natural language editing where capitalization varies by context, case-sensitive is safer.

Whole Word vs. Substring Replacement

"Replace 'the' with 'a'" — should this match "there", "other", and "together"? In most cases, no. Whole-word matching restricts replacements to instances where the search term appears as a complete word (surrounded by spaces or punctuation), not as part of a larger word.

Where this matters in practice: replacing "UK" in a dataset shouldn't also replace "Ukraine" or "bulk". Whole-word mode catches "UK" as a standalone code; substring mode would incorrectly modify "bulk" to "balk".

Regex Find and Replace: The Basics

Regular expressions (regex) allow pattern-based matching instead of literal string matching. Instead of finding an exact string, you find text that matches a pattern:

  • \d+ — matches any sequence of digits
  • \b[A-Z]{2,3}\b — matches standalone 2–3 letter uppercase codes
  • https?://\S+ — matches any URL

With regex replacement, you can use capture groups to rearrange text: match a date like 01/15/2026 with (\d{2})/(\d{2})/(\d{4}) and replace with $3-$1-$2 to get 2026-01-15.

Most advanced text editors (VS Code, Sublime Text, Notepad++) support regex find and replace. Online tools also support it for quick transformations without needing to open a code editor.

Common Practical Use Cases

Fixing separators in data exports: Replace \t (tab) with , to convert TSV to CSV. Replace ; with \n to split a semicolon-delimited list into one-per-line format.

Standardizing product codes: Replace "product-" with "PROD-" across an inventory list. Replace old SKU prefixes with new ones.

Template mail merges: Replace [FIRST_NAME] with a name, [COMPANY] with a company name — across a block of email copy before sending.

Cleaning scraped data: Remove HTML tags by replacing <[^>]+> (regex for any HTML tag) with nothing (empty string).

Try the Free Tool

Paste any text, find a word or phrase, and replace it — instantly. Supports plain text and case-sensitive options.

Open Find & Replace →

Frequently Asked Questions

What is the keyboard shortcut for Find and Replace?

Ctrl+H on Windows/Linux in most applications (Word, Notepad, VS Code, browser DevTools). Cmd+H on Mac in some apps, though many use Cmd+Option+F. In Google Docs: Ctrl+H (Windows) or Cmd+Shift+H (Mac). The shortcut varies by application.

How do I replace text in all files in a folder?

For bulk file replacement, use a code editor with multi-file search (VS Code: Ctrl+Shift+H, then specify the folder), command-line tools (sed on Mac/Linux: sed -i 's/old/new/g' *.txt), or dedicated tools like Find & Replace (Windows app). An online text tool handles single text blocks, not multiple files simultaneously.

Can I undo a find and replace?

In desktop text editors: yes, Ctrl+Z undoes the replacement. In online tools: depends on the tool — most don't have undo, so work on a copy of your text or use a local editor for critical replacements where undo matters.

What is the difference between find and replace and search and replace?

They mean exactly the same thing. 'Find and replace' is the more common term in Microsoft products; 'search and replace' is used in code editors and Unix tools (sed uses 's/search/replace/'). Both describe the same operation: locating text and substituting it with different text.

How do I replace a line break with a space in text?

In a regex-capable tool: search for \n (newline) and replace with a space. In Word: find ^p (paragraph mark) and replace with a space. In an online find & replace tool that supports escape characters: search for \n, replace with " " (space). This joins all lines into one continuous string.