Skip to content
PocketDesk
Your files are processed on your device, never uploaded

Find and replace

Replace words or patterns across your whole text. Nothing is uploaded.

  • Runs in your browser
  • No sign-up
Result

How to find and replace text

  1. Paste your text into the box.
  2. Type what to look for in Find, and the new text in Replace with.
  3. Use the switches if you need them: Regular expression, Match case and Whole word only.
  4. Check the Matches tile, then copy or download the result.

Plain text and patterns

In plain mode, the text you type is matched exactly as written. Characters such as dots, brackets and dollar signs have no special meaning, so you can replace a price or a file name without escaping anything.

In regular expression mode, your text is read as a pattern. A pattern can match many different strings at once. For example, \s+ matches any run of spaces, and (\w+)@(\w+) captures two parts of an email address. In the replacement you can write $1 and $2 to put the captured parts back in any order, or $& for the whole match.

Matching ignores capital letters unless you turn on Match case. Whole word mode works with accented letters and other scripts, not only English.

If the pattern cannot be read, you see an error such as “Invalid regular expression” and no changes are made.

Tips

  • Replace commas with a line break by typing , in Find and \n-style breaks by pasting a real line break into Replace.
  • Test a pattern on a small sample first. Patterns that match too much can rewrite more than you expect.
  • To compare the result with your original, paste both into the text diff checker.
  • For spacing problems, remove extra spaces is simpler than writing a pattern.

Privacy

Everything is processed on your device. Your text is not uploaded, saved on a server, or added to the page address. Only your option choices are remembered.

Questions

How do I use a regular expression?

Turn on Regular expression and type a pattern in Find. For example, \d+ finds every run of digits. In Replace with, use $1 and $2 to reuse parts you captured in brackets.

What happens if my pattern is wrong?

The tool shows a short error message instead of a result. Fix the pattern and the result returns at once.

What does Whole word only do?

It matches only when the text stands alone. Searching for cat will not touch category or concatenate.

Can I delete text with it?

Yes. Leave Replace with empty and every match is removed.

Is my text uploaded?

No. Matching runs in your browser, and your text never leaves your device.

More text tools