Find and Replace
Interactive StudioFind and replace text, with optional regular expression support. Instant feedback with zero server storage.
Loading tool…
About Find and Replace
In plain-text mode, this tool treats your search term as a literal string — every special regex character in it (like . * + ? ( )) is automatically escaped before matching, so searching for "3.14" only matches that exact sequence rather than "3" followed by any character followed by "14". Every match in the text is replaced in one pass, not just the first one.
Switching on regex mode passes your find pattern straight to JavaScript's RegExp engine with the global flag, unlocking pattern-based replacements: capture groups, character classes, quantifiers, and anchors all work as they would in any JS-flavored regex. This is what lets you do things a literal search can't, like replacing every sequence of digits with a placeholder, or matching a word only at the start of a line. If the pattern is malformed — an unclosed bracket or unescaped special character where a valid regex is expected — the tool reports a regex error rather than silently failing.
This is useful for cleanup tasks like normalizing inconsistent phrasing across a document, stripping a template placeholder that repeats many times, or making the kind of pattern-based substitution that a simple find would miss but a full regex can express in one line.
How to use Find and Replace
- Paste your text.
- Enter the text to find and the replacement.
- Toggle regex mode, case sensitivity or whole-word options if needed.
- Copy the result.
Worked examples
Input: Find 3.14, replace with pi, in the text: Pi is 3.14 and 3x14 is 42
Result: Pi is pi and 3x14 is 42. In plain-text mode the dot is literal, so 3x14 is untouched.
Input: Regex mode: find (\d+)-(\d+), replace with $2-$1, in 10-20
Result: 20-10
Background
In plain mode the search term is escaped so special characters are matched literally. In regex mode it is treated as a regular expression, so ., * and ( ) have special meaning and capture groups can be reused in the replacement as $1, $2 and so on.
Every match is replaced in a single pass. Because the replacement is not searched again, replacing a with aa will not loop forever.
Common mistakes
- Leaving regex mode on when searching for text that contains dots or brackets.
- Forgetting that matching is case-sensitive by default.
- Not previewing the result before pasting into important files.
Frequently Asked Questions
Frequently Paired With
Fast, local-first developer micro-tools with zero tracking or latency.
Username Generator
Generate random, memorable usernames.
Word Counter
Count words, characters, sentences with readability & density analysis.
Base64 Encoder
Encode or decode Base64 text.
Text Diff
Compare two texts and highlight differences.
