Hoglet

Find and replace

Type what to find: the matches are marked in the text.
Paste a text to work on

Find and Replace Text Online, with Regex, Private

Replace words or patterns throughout a text.

Paste a text, type what to find and what to put in its place. Every match is marked in the text as you type and counted; step through them with the arrows (Enter in the Find box, or N), and see what each one becomes before you change anything. Replace changes the one picked out, Replace all changes every one, and each can be undone. The buttons after the Find box match capitals exactly (Aa), whole words only (ab) or a regular expression (.*), also with Alt+C, Alt+W and Alt+R. With a regular expression the replacement can use what was found: $1 for the first group, $<name> for a named one, $& for the whole match, \n for a line break. In Options, “Keep capitals” writes “Colour” as “Color” and “COLOUR” as “COLOR”. A pattern that would take too long is stopped after two seconds and the page stays usable. Your text is worked on in your browser and never uploaded.

How to use Find and replace

  1. Paste the text into the box, then type what to find and what to put in its place.
  2. Step through the matches with the arrows and see what each becomes; the buttons after Find set capitals, whole words or regex.
  3. Press Replace or Replace all, then Copy text.

Find and replace: common questions

Is it safe to use an online find and replace tool on private text?

Hoglet’s Find and replace works on your text in your browser and never uploads it. Every match is found on your device, so a document, a list or code can be edited without it leaving.

Can I use regular expressions in find and replace?

Yes. With the .* button on (or Alt+R), Find and replace takes JavaScript regular expressions; the replacement can use $1 for the first group, $<name> for a named one, $& for the whole match and \n for a line break. A pattern that takes too long is stopped after two seconds.

How do I replace a word but keep its capitals?

Turn on Keep capitals in Find and replace’s Options. A replacement typed in small letters then takes the capitals of what it replaces, so “Colour” becomes “Color” and “COLOUR” becomes “COLOR”.

Everything stays on your device. Nothing is uploaded. Works offline once your first visit has stored the app.