100% Client-Side WASMZero Remote NetworkVerified Spec

Find and Replace

Interactive Studio

Find 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

  1. Paste your text.
  2. Enter the text to find and the replacement.
  3. Toggle regex mode, case sensitivity or whole-word options if needed.
  4. 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

What's the difference between plain find/replace and regex mode?
In plain mode, the find text is matched literally — even characters like . or * are treated as themselves. In regex mode, the find text is interpreted as a JavaScript regular expression, so those characters act as pattern syntax (any character, zero-or-more repetition, and so on).
Are all matches replaced, or just the first one?
All matches in the text are replaced in a single pass — the search runs with the global flag, so it doesn't stop after the first occurrence.
Why do I get an 'invalid regular expression' error?
That means the pattern isn't valid regex syntax with regex mode enabled — commonly an unclosed parenthesis or bracket, or a dangling special character. Switch off regex mode if you meant to search for that text literally.
Can I use capture groups in the replacement text?
Yes, in regex mode. Wrap part of your find pattern in parentheses to create a capture group, then reference it in the replacement field with $1, $2, and so on for however many groups you defined.

Fast, local-first developer micro-tools with zero tracking or latency.

Browse All Tools
Local-First Architecture: Toolium parses payloads exclusively in browser memory. Zero network telemetry.
⌘C Copy⌘K Palette