Skip to main content
NyankoTools

Find & Replace and Line Operations

Bulk find and replace, plus line-by-line edits in one place: add or remove line numbers, keep or remove lines that contain a keyword, add text to the start or end of every line, and reverse the line order. To remove duplicate lines, sort, or delete empty lines, use the Text List Deduplicate, Sort & Shuffle tool.

🔒 Runs in your browser · Your data is never sent to a server

How to use

  1. Paste the text you want to edit into "Input text".
  2. Pick an "Operation" (replace, filter lines, add prefix/suffix, add line numbers, remove line numbers, or reverse lines) and fill in the fields that appear.
  3. Check the "Result" and take it out with "Copy".

Notes

  • With regular expressions on, the replacement can use $1 (the first group) and $& (the whole match). ^ and $ match the start and end of each line.
  • With "Use regular expression" off, characters such as . and ( are searched and replaced literally.
  • Line operations output LF line endings (only Find & replace keeps the line endings of your input).
  • Removing line numbers strips a leading number plus any following punctuation (period, parenthesis, colon), space or tab. Text that genuinely starts with a number, such as 100 apples, 1.5 kg or 10:30, may lose its number.
  • Very complex regular expressions or huge texts may slow down your browser.
  • Everything runs entirely in your browser — the text you enter is never sent to a server.

Glossary

Regular expression

A notation for describing text patterns. For example \d+ matches a run of digits and ^foo matches lines starting with "foo".

Capture group (backreference)

The part of a regular expression wrapped in ( ). In the replacement, $1, $2 insert those captured parts so you can reorder them.

FAQ

Can it remove duplicates or sort lines?

Not here. For removing duplicate lines, sorting, shuffling, or deleting empty lines, use the "Text List Deduplicate, Sort & Shuffle" tool. This one focuses on find & replace and line edits such as numbering, filtering, and adding prefixes or suffixes.

Can I rearrange the matched parts in the replacement?

Turn on "Use regular expression", wrap parts of the pattern in parentheses such as (\w+)=(\d+), and refer to them in the replacement as $2:$1. $& stands for the whole match.

How do I replace text that contains "." or "("?

Leave "Use regular expression" off. When it is off, symbols are searched and replaced as plain characters, so no escaping is needed.

Can I remove line numbers after adding them?

Yes. "Remove line numbers" strips leading numbers such as "1. ", "2) ", "3: " or "4 ". Text that really starts with a number, like "100 apples", can be treated as a line number too, so check the result.

Is the text I enter sent anywhere?

No. Everything is processed in your browser, and the text you enter is never sent to a server.

Share this page

↑↓ Select Enter Open Esc Close