Skip to content

Find and Replace

Find and replace text with support for regular expressions, case-sensitive matching, and whole-word search options.

Loading...
1. Paste or type the text you want to search through into the main text area. 2. Enter the search term or regular expression pattern in the Find field. 3. Enter the replacement text in the Replace field. 4. Toggle options such as case-sensitive, whole-word, or regex mode to refine your search. 5. Review the highlighted matches in the preview to verify what will be replaced. 6. Click Replace All to apply all replacements at once, then copy the result.

About This Tool

The Find and Replace tool lets you search for specific text within a document and replace it with new text. It supports plain text matching as well as full regular expression patterns, making it powerful enough for both simple substitutions and advanced text transformations.

Options include case-sensitive matching, whole-word-only matching, and regex mode with full JavaScript regular expression syntax. In regex mode, you can use capture groups and backreferences in your replacement text, enabling sophisticated pattern-based transformations like reformatting dates, extracting data, or restructuring text.

The tool highlights all matches in the original text so you can see exactly what will be replaced before committing the change. A match counter shows the total number of occurrences found. You can replace all matches at once or review and confirm replacements individually. This is an indispensable tool for writers, editors, developers, and anyone who works with text.

Frequently Asked Questions

Regular expressions (regex) are patterns that describe sets of strings. Enable regex mode to use patterns like \d+ to match numbers, [A-Z] to match uppercase letters, or .* to match any sequence of characters. The tool uses JavaScript regex syntax.
Yes. In regex mode, wrap parts of your search pattern in parentheses to create capture groups, then reference them in the replacement with $1, $2, etc. For example, search for (\w+)@(\w+) and replace with $2-$1 to swap text around the @ symbol.
Whole-word matching ensures that the search term is only matched when it appears as a complete word, not as part of a larger word. For example, searching for "cat" with whole-word matching will not match "category" or "concatenate."
The tool shows a preview of all matches before you apply the replacement, so you can review changes. Your original text remains in the input field until you choose to apply changes, giving you full control.
No practical limit. The tool can handle thousands of replacements in a single pass. It processes everything in your browser, so performance depends on the size of your text and the complexity of your regex pattern.

Related Tools

Text Diff and Compare Tool

Compare two blocks of text side by side and highlight the differences. Find additions, deletions, and changes instantly.

Text and Writing

Word Counter and Character Counter

Count words, characters, sentences, and paragraphs in your text. Includes reading time and speaking time estimates.

Text and Writing

Remove Duplicate Lines

Remove duplicate lines from your text while preserving the original order. Supports case-sensitive and case-insensitive modes.

Text and Writing

Case Converter

Convert text between UPPER, lower, Title, Sentence, camelCase, snake_case, kebab-case, CONSTANT_CASE, and PascalCase.

Text and Writing

Whitespace Remover and Trimmer

Remove extra whitespace, trim leading and trailing spaces, collapse multiple spaces, and clean up messy text formatting.

Text and Writing

Regex Cheatsheet

Interactive regex syntax reference with descriptions, examples, and a try-it-live tester for each pattern.

DevOps Tools