← Home

🔍 Find and Replace

Search and replace text with case-sensitive, whole word, and replace-all options.

What is this tool?

A find and replace tool is one of the most frequently used text editing utilities, allowing you to search for specific text patterns and replace them with new text throughout a document. Whether you need to update a recurring term across a large block of text, change a name or URL that appears dozens of times, fix a consistent typo, or reformat data by replacing delimiters, this tool handles the task instantly. Unlike basic text editor functions, this tool offers advanced options including case-sensitive matching, where uppercase and lowercase letters must match exactly, and whole word matching, where the search term only matches when it appears as a complete word rather than as part of a larger word. For example, searching for cat with whole word matching would find the animal but not catch or concatenate. The tool also shows you exactly how many replacements were made, so you can verify the changes were correct. This is invaluable for tasks like updating product names, standardizing date formats, correcting systematic spelling errors, replacing placeholders in templates, or cleaning up data exports. Everything runs locally in your browser.

How it works

The find and replace tool processes your text using JavaScript string operations. When you enter a search term, a replacement term, and press the Replace button, the tool splits your text and examines each occurrence of the search string. In case-sensitive mode, it performs exact string matching. In case-insensitive mode, it converts both the search term and the text to lowercase before comparing. In whole word mode, it uses a regular expression with word boundary markers to ensure the search term only matches when surrounded by non-word characters or string boundaries. The replacement is applied to every match found throughout the text, not just the first occurrence. The tool counts the total number of replacements made and displays this count alongside the output. For regular expression mode, it compiles the pattern and applies the global replace flag. All operations happen instantly in your browser with no data sent anywhere.
Ad

How to use

  1. Paste the text you want to modify into the input text area.
  2. Enter the text you want to find in the Find field. This is the text that will be replaced.
  3. Enter the new text in the Replace With field. This is what will replace each occurrence of the Find text.
  4. Select options as needed: check Case Sensitive for exact capitalization matching, or check Whole Word to only match complete words.
  5. Press the Replace button to process your text. The tool shows the number of replacements made and the modified text.

Frequently Asked Questions

Frequently Asked Questions

Can I replace text with nothing to delete it?
Yes. Leave the Replace With field empty and every occurrence of the Find text will be removed. This is useful for deleting unwanted prefixes, suffixes, formatting characters, or specific words from your text.

What does whole word matching do?
Whole word matching ensures that your search term only matches when it appears as a complete word, not as part of a larger word. For example, searching for sun with whole word matching would match sun but not sunny, sunlight, or sunflower. This prevents unintended replacements in words that contain your search term as a substring.

Does it support regular expressions?
Yes, the tool supports regex mode. When enabled, your Find text is treated as a regular expression pattern, allowing powerful pattern-based matching and replacement. This is useful for complex find and replace tasks like reformatting phone numbers or extracting patterns.

Is there a limit on text size?
There is no strict limit, but performance depends on your browser and device. For most practical text sizes of up to several hundred thousand characters, processing is instant. Very large inputs may take a moment but will complete. All processing is done locally in your browser.

Tips & Advice

Always double-check your search term before performing a replace-all operation, especially on important documents, because replacements cannot be undone after the text is modified. When using case-insensitive mode, be aware that words with different capitalization will all be matched, which is usually what you want for names and common words. For data cleaning tasks, consider combining this tool with the Text Sorter and Remove Duplicate Lines tools in a pipeline: first replace, then sort, then deduplicate. If you are replacing text that might appear as part of URLs or HTML tags, use whole word mode to avoid breaking links or markup. All processing happens locally in your browser.

Related Text Tools

Ad