Find and Replace Text

Free find and replace text tool. Search for a literal string or regular expression and replace it, with options for case sensitivity and replacing all or one occurrence.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter find and replace text.

How find and replace text works

Find and replace searches a body of text for a target and substitutes it with something else. In literal mode the target is matched character for character; in regex mode it is a regular expression that can match patterns like digits, words, or repeated groups, which is far more powerful for bulk edits.

This tool supports both modes plus the usual options: case sensitive (default on) controls whether "Hello" and "hello" match, and replace all (default on) controls whether every match is replaced or only the first. In literal mode any regex metacharacters in your find string are escaped automatically, so a literal "." matches a period rather than any character.

Paste your text, enter the find and replace strings, choose your options, and click Replace. The tool reports the number of replacements made so you can confirm the edit did what you expected. Use it for cleaning up data, renaming identifiers across a file, or redacting repeated terms.

Frequently asked questions

What is the difference between literal and regex mode?
In literal mode the find string is matched exactly, character for character. In regex mode it is treated as a regular expression, so you can match patterns like \d+ for numbers or \bword\b for whole words. Metacharacters are escaped automatically in literal mode.
Does it replace all matches or just the first?
By default it replaces all matches (global). Turn off Replace all to replace only the first occurrence.
Is the match case sensitive?
Yes by default, so "Hello" does not match "hello". Turn off Case sensitive to match regardless of letter case.
What happens if the find string is empty?
No replacement is made and the original text is returned unchanged, with zero replacements reported. An empty find would otherwise match between every character, which is rarely useful.