Neatbo.

Find & replace

Replace literal text or JavaScript regex matches, with controls for case and first or all matches.

Browser-local processingInputTextOutputUTF-8 text (.txt)
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input
0 characters · 0 bytes
Options

Complete the required options first. You can keep the defaults for the rest.

Required. Enter the text to find, or a pattern if regex mode is on. Enter patterns without surrounding / delimiters or appended flags.

Leave blank to delete matches. Dollar tokens are literal unless regex mode is on; typing \n does not create a line break.

When checked, replace all non-overlapping matches; otherwise replace only the first. Replacement text is not searched again.

Keep checked for case-sensitive matching. Turning it off adds JavaScript's i flag.

Interpret Find as a JavaScript regular expression. These options add only g, i and m flags; no u or s flag is added. Matching uses UTF-16 units, so check emoji and other combined characters carefully.

In regex mode, make ^ and $ match line boundaries. This does not make . match line breaks.

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.⌘ / Ctrl + Enter to run

Preparing the tool…

Before you start

Find exact text by default, with case matching and all matches enabled. Add replacement text, or leave it blank to delete matches. Turn on regular expressions when you need patterns, then run the tool and check the resulting text.

How to use this tool

  1. Paste content into “Text”, or load the example to try it.
  2. Enter the text to search for in “Find” and the replacement text in “Replace with”. Choose whether to match case and whether to replace the first match or all matches. Turn on regex mode if needed, then select “Find and replace”.
  3. Read the result and match count, then use “Copy result” or download result.txt. For another pass, choose “Use result as input”.

Supported inputs and limits

Paste up to 1 MiB (1,048,576 UTF-8 bytes), including spaces and line breaks. All option values together have a 2 MiB UTF-8 budget; very long Find or Replace with values may also need shortening.

Regex patterns may contain at most 4,096 UTF-16 code units. Regex processing has a two-second timeout once the Worker is ready; loading has a separate 30-second timeout. The final text result is limited to 30 MiB of UTF-8 bytes.

Find is required. A blank replacement deletes matches; if there is no match, the source is returned unchanged. Empty source text is allowed, and regex patterns that match empty positions can insert text.

Worked example

Example input

a.b.a.b
Example options
{
  "find": ".",
  "replacement": "X"
}

Example output

aXbXaXb

When something does not work

Keep a copy of the original text. If the result changes too much, turn off “Replace all matches”, narrow Find or switch off regex mode, then run again. Shorten input or replacement text if a limit is reached. A processing failure clears the result; an edit, cancelled run or missing required field may leave the previous result visible, so run again before using it.

Frequently asked questions

Where does the tool process my text?

It runs locally in a Worker in your browser. Tool switches can keep input and retained results temporarily in the same tab, within cache limits. Refreshing or closing the tab clears that workspace; save the source and any result you need before then.

How do replacement tokens work?

With regex mode off, Replace with is inserted literally: $& stays $&. In regex mode, $& inserts the match, $1 and other valid numbered groups insert captures, and $<name> inserts a named capture when the pattern has named groups. $$ inserts a dollar sign; $` and $' insert the text before or after the match. Typing \n in Replace with keeps a backslash and n; it does not insert a line break.

What does the count mean, and can I reuse the result?

The count records matches processed, including matches whose replacement leaves the text unchanged. “Copy result” and result.txt contain the full text. “Use result as input” replaces the input and saves its previous text; “Undo input change” restores that saved text once. It does not restore earlier edits or option settings. “Use result as input” is disabled while processing or while its result is stale.

Documentation & further reading

Related tools