Find & Replace
Find and replace text using plain text or regular expressions.
Last updated August 26, 2026
About this tool
This tool finds and replaces text across a block of content, supporting both plain-text matches and full regular expressions for pattern-based replacements — useful for bulk-editing code, cleaning up data, or reformatting text without opening a full editor. Options let you toggle case sensitivity and choose between replacing the first match only or every match in the text.
Code examples
The second line (where shown) is the inverse operation.
| Language | Code |
|---|---|
| JavaScript | text.replace(/dog/gi, 'cat') |
| Python | re.sub(r'dog', 'cat', text, flags=re.IGNORECASE) |
| Shell (sed) | sed 's/dog/cat/gi' file.txt |
Frequently asked questions
What's the difference between plain text and regex mode?
Plain text mode treats your search term literally, escaping any special characters. Regex mode lets you use patterns like `\d+` (digits) or `^\s+` (leading whitespace) for more powerful, rule-based matches.
Why does my replacement only affect the first match?
Turn on “Replace all” — without it, only the first match in the text is replaced, matching standard regex behavior without the global flag.
More in Text Tools
Convert text instantly between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and more. Copy any converted version with one click.
Count words, characters, sentences, and estimated reading time.
Generate free Lorem Ipsum placeholder text by paragraphs, sentences, words, or exact character count. Copy the result as plain text, HTML, or Markdown — no signup required.