Find and Replace
Find and replace text with support for case-sensitive, whole word, and regex matching. Free online find and replace tool with live preview.
Output will appear here...
What is Find and Replace?
Find and replace is a text operation that searches for specific text patterns and replaces them with new text. This tool supports three matching modes: literal text (exact match), case-insensitive matching, whole word matching, and regular expressions (regex). It's useful for batch renaming, reformatting data, cleaning up text, and code refactoring.
How to Use
- Enter the text to find in the 'Find' field
- Enter the replacement text in the 'Replace with' field
- Toggle options: case sensitive, whole word, or regex mode
- Click 'Apply to Input' to replace matches directly in the input text
Examples
Replace a word
Regex replace digits
Related Tools
Regex Tester
Test regular expressions online with real-time matching and group extraction. Free regex tester with flags support.
Remove Duplicate Lines
Remove duplicate lines from text instantly. Free online deduplication tool with options for case sensitivity and sorting.
Trim Whitespace
Trim leading and trailing whitespace, trim each line, and collapse multiple spaces. Free online whitespace trimmer with customizable options.
Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and more. Free online case converter.
Frequently Asked Questions
What does 'whole word' matching mean?
Whole word mode adds word boundary checks so 'cat' matches only the standalone word 'cat', not 'category' or 'concatenate'. It uses \b word boundaries in regex. Useful for replacing variable names without affecting longer identifiers.
Can I use regular expressions?
Yes. Enable the Regex checkbox to use regex patterns in the Find field. You can use capture groups like (\w+) and reference them in the replacement with $1, $2, etc. Invalid regex patterns will show an error message.
What does 'Apply to Input' do?
Clicking 'Apply to Input' permanently replaces the matches in your input text. This is useful for iterative find-and-replace operations where you want to chain multiple replacements. The output preview always shows what the result would look like.