Find and Replace Text
Paste your text, say what to find and what to replace it with, and see the result instantly. Add several rules, match case or whole words, or use regular expressions.
How to use Find and Replace on KickSolve
Three quick steps, no account needed.
Why choose KickSolve
Built for speed, privacy and clean results.
What you can do with Find and Replace
Everything this tool offers.
About Find and Replace on KickSolve
What it does and how to get the best results.
How find and replace works
Every place where your Find text appears is replaced with your Replace text. If Replace with is empty, the matches are deleted. With several rules, each rule runs on the result of the one before it, in the order shown.
Match case and whole words
By default case is ignored, so hello matches Hello and HELLO. Tick Match case to make it exact. Whole words only stops partial matches, so replacing cat does not change category.
Regular expressions
Tick Use regular expressions to search with patterns, for example to match digits, repeated spaces or several spellings at once. Parentheses capture parts of a match so you can reuse them as $1, $2 and so on in the Replace box. The patterns follow the JavaScript regular expression rules. In regex mode, \n in the Replace box becomes a line break and \t becomes a tab.
Good to know
- If a pattern is invalid, you see an error message that names the rule.
- Very complex patterns on very large texts can be slow, because they run in your browser.
- Without regular expressions, special characters such as . and * are treated as plain text.
Useful regex examples
Tick Use regular expressions and try these.
| Goal | Find | Replace with |
|---|---|---|
| Collapse repeated spaces | {2,} | (one space) |
| Remove blank lines | ^[ \t]*\n | (empty) |
| Remove trailing spaces | [ \t]+$ | (empty) |
| Swap two words | (\w+) (\w+) | $2 $1 |
| Add a dash before each number | (\d+) | -$1 |
Frequently asked questions
Quick answers.
How do I replace all occurrences of a word?
Paste your text, type the word in Find and the new word in Replace with. All matches are replaced at once.
How do I delete text?
Leave Replace with empty. Every match of Find is removed.
Is it case sensitive?
Not by default. Tick Match case if hello and Hello should be treated differently.
What does Whole words only do?
It only matches complete words, so replacing cat leaves category unchanged.
Can I use regular expressions?
Yes. Tick Use regular expressions. You can use groups in the pattern and refer to them as $1, $2 and so on in the replacement.
Can I do several replacements at once?
Yes. Add up to 10 rules. They run in order, each on the result of the one before.
How do I add a line break in the replacement?
Tick Read \n and \t as line break and tab, or use regular expressions, where \n in the replacement becomes a line break.
Is my text uploaded?
No. Everything happens in your browser.
More free tools from KickSolve
Related everyday tools.