freesabai

Text tools

Find and replace text

Paste text, then add as many pairs of "find" and "replace with" as you like. They are applied one after the other. Use plain text or regex, and a regex that runs for more than 1 second is stopped, so the page does not freeze. It runs in your browser and the text is not sent anywhere.

This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.

How to use it

  1. Paste the text into the box on the left, then type what to find and what to replace it with (press "Add a pair" for more).
  2. Choose options such as ignore case, whole words, or "Use regex". The result shows at once with how many times each pair replaced something.
  3. Press "Copy" or "Download" to take the result.

Frequently asked questions

Can a regex replacement keep parts of the original text?

Yes. Put brackets around the parts to keep and use $1, $2 or a group name $<name> in "Replace with". For example find (\d{3})-(\d{4}) and replace with $2-$1. $& is the whole match. Without regex, $ is just a dollar sign.

Can I type a line break in the find or replace box?

Yes. The boxes take several lines, so press Enter to put in a line break. In regex mode you can also use \n in the find box.

Can a regex freeze the page?

Some regexes, such as (a+)+$ on a long text that does not match, must try billions of ways and almost never finish (called ReDoS). This tool runs the regex in a background worker and stops it after 1 second, and tells you to change the pattern, so the page does not freeze.

Good to know

Your data stays on your device

Everything runs in your browser. What you type, paste or open is not sent to freesabai's servers or anyone else's, and is not kept in the browser: close the page and it is gone. The site only counts how many times this page was opened and how many times someone copied or saved a result (never what was pasted or the result, and you can switch the counting off in the footer; see the privacy policy).

Report a problem or suggest an idea

Found a bug, or want this tool to do more? Tell us on the feedback page. No sign-up.

Other text tools

Convert and edit text

Lines

Thai language

More tools for text (in the developer tools)