Find and Replace String
Find and replace text, with optional case sensitivity and regex, live as you type.
Replaces every match, live as you type. With "regular expression" off, your search text is matched literally (special characters like . or * aren't treated as regex syntax). Runs entirely in your browser.
Need the opposite? Remove Spaces
What is Find and Replace String?
Replaces every occurrence of a search string in your text, live as you type. There's no need to click a "Replace" button; every match updates as soon as you adjust the search term, replacement, or options. Toggle case sensitivity when you need an exact match, or treat the search term as a full regular expression for pattern-based replacements like stripping all digits or normalizing whitespace. It's useful for quick text cleanup, renaming a variable across a pasted code snippet, fixing a repeated typo, or reformatting log output, without opening a full editor. Everything runs entirely in your browser; nothing you paste is sent to a server.
How to Use Find and Replace
- 1
Paste the Text: Enter the text, code snippet, or log output you want to edit.
- 2
Enter the Search Term and Replacement: Type what to find and what to replace it with.
- 3
Toggle Case Sensitivity or Regex: Enable either option as needed for your pattern.
- 4
Copy the Result: Use the copy button to copy the updated text.
How It Works
Every occurrence of the search term in your text is replaced live, re-run on every keystroke in any of the three fields (text, search term, replacement). With regex mode off, the search term is matched as a literal string, no special characters. With regex mode on, the search term is compiled as a JavaScript regular expression, so capture groups and character classes work as expected. Case sensitivity is an independent toggle from regex mode, and you can combine either with either.
Example
Text: "The cat sat on the mat." Find: "at", Replace: "og" gives "The cog sog on the mog."
With regex mode on, Find: "[aeiou]", Replace: "*" turns "The cat sat" into "Th* c*t s*t", replacing every vowel.Common Use Cases
Renaming a variable across a pasted code snippet, fixing a repeated typo across a whole document, normalizing inconsistent spacing or punctuation in log output, or doing a quick pattern-based cleanup (stripping digits, collapsing whitespace) without opening a code editor.
Frequently Asked Questions
Common questions about Find and Replace String.