Skip to main content

Find & Replace

Search and replace text with regex, case sensitivity, whole-word matching, and match-by-match navigation.

Free & unlimited
Find
Replace with
Options
Text
All processing happens in your browser. No data is sent to any server.

About this tool

  1. 1

    Enter your text

    Paste the text you want to search through, or upload a file.

  2. 2

    Set the search pattern

    Type a literal string or toggle regex mode for advanced pattern matching.

  3. 3

    Enter the replacement

    Specify what to replace matches with. Use $1, $2 for regex capture groups.

  4. 4

    Apply and review

    Preview highlighted matches, then apply the replacement and copy or download the result.

  • Use regex capture groups like (\w+) and reference them in the replacement as $1 to restructure text.
  • Enable case-insensitive mode with the /i flag to catch all variations of a word.
  • Use \b word boundaries to avoid partial matches - e.g., \bcat\b matches "cat" but not "category".
  • The match counter shows how many instances will be replaced before you commit.
  • Literal string and full regex pattern support
  • Real-time match highlighting
  • Capture group references in replacements
  • Case-sensitive and case-insensitive modes
  • Match count and preview before applying
  • Bulk-rename variables or identifiers across a block of code.
  • Clean up formatting inconsistencies in pasted text - like double spaces or trailing whitespace.
  • Reformat dates, phone numbers, or other structured text using regex patterns.
  • Strip unwanted HTML tags or special characters from content.
The tool uses JavaScript regular expressions, which support lookaheads, lookbehinds, character classes, quantifiers, and all standard features.
Yes. Leave the replacement field empty to delete all matching text.
Yes. Toggle off the "global" flag (g) to replace only the first occurrence.

Related tools

View all

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy