Format

Find and replace any phrase in a block of text

Replace any word, phrase, or regex pattern in any block of text.

🛡️ Your rows never leave your browser.
Why Onfyt: Accepts both literal text and regex in the same instruction interface — you choose the mode by adding 'use regex' without needing a separate toggle.

Interactive Sample Data

idtext
1Status: pending — Order #1001
2Status: PENDING — Order #1002
3Status: complete — Order #1003

How this tool works

Find and replace is the most fundamental text operation in any editor or IDE — but browser text areas do not offer it, and uploading sensitive documents to Google Docs just to run Ctrl+H creates unnecessary exposure. This tool applies find-and-replace to any pasted text. It supports three modes: - **Literal text** (default): every exact character sequence matching the search term is replaced. - **Case-insensitive literal**: 'foo', 'Foo', and 'FOO' are all replaced. - **Regular expression (regex)**: the search pattern is a full JavaScript-compatible regex, allowing captures, character classes, and quantifiers. Specify the search and replacement in your instruction: - "Replace 'old text' with 'new text'" — literal replace-all. - "Replace 'old text' with 'new text', first occurrence only" — replaces one match. - "Replace 'old text' with 'new text', case-insensitive" — matches any casing. - "Use regex: replace \d+ with NUMBER" — numeric sequences replaced with the word NUMBER. All replacements run inside your browser — no server upload.

Things that usually go wrong

  • Regex special characters (., *, +, ?, (, ), [, ], {, }) in a literal search term will cause unexpected matches — use 'literal' mode or escape them with backslash.
  • Capture group references ($1, $2) in the replacement only work when 'use regex' is specified.
  • Replace with a newline character: write '\n' in the replacement and specify 'interpret escape sequences' in the instruction.

Edge cases we tested

🧪 Search term not found in text

Text returned unchanged with a note: '0 replacements made.'

🧪 Replace with empty string (effectively deleting the search term)

All occurrences of the search term are deleted. Instruction: replace 'unwanted' with nothing.

🧪 Regex with capture group (replace 'date: (\d{4})' with 'year: $1')

Capture group $1 expanded correctly in the replacement.

🧪 Search term that is a special regex character (e.g. the dot '.')

In literal mode, the dot is escaped automatically before being used as a pattern.

🧪 Replace all vs. first-occurrence-only

Default is all occurrences; add 'first occurrence only' to limit to one.

Frequently Asked Questions

Can I do multiple different replacements in one run?

Yes — list them as separate instructions on different lines, e.g. 'Replace foo with bar' then 'Replace baz with qux'. The engine applies them in sequence.

Does this work on CSV data?

Yes, but it replaces text inside quoted cells the same as text outside them. For column-specific replacement, use 'Find and Replace in CSV'.

Can I replace a newline character?

Yes — use 'use regex' mode and write \n in the search pattern.

What is the maximum text size?

The engine runs inside your browser and handles several megabytes of text without issue.

Related tools

Clean

Find and Replace in CSV

Replace text values across all cells or within specific columns in a CSV file.

Open Tool →
Clean

Regex Replace in CSV

Apply regex patterns with capture groups to transform cell values across CSV columns.

Open Tool →
Clean

Remove Extra Spaces

Collapse multiple consecutive spaces into one and strip leading/trailing spaces from any text.

Open Tool →
Clean

Remove Special Characters

Strip invisible control characters, non-ASCII symbols, smart quotes, and unwanted punctuation from spreadsheet cells.

Open Tool →