Skip to main content

Find & Replace

Batch process text documents with advanced string matching. Supports basic regex patterns.

edit_note By Meet Dhameliya
update Updated: Jul 28, 2026
schedule 4 min read

Find-and-replace is one of the most universally needed text operations — and yet it is frequently awkward to access when you are working outside a full code editor. A plain text document in Notes. A block of CSV data in a browser tab. A configuration snippet copied from a terminal. A content file where you need to change every occurrence of a company name, a domain, a variable name, or a boilerplate phrase before pasting it somewhere else. The Utility Spark Find & Replace tool gives you the same capability you expect from a code editor — but in a lightweight, always-accessible browser tab. Paste your text, enter your search term and replacement, set your options (case-sensitive, whole word only, regex mode), and replace all occurrences in one click. The tool reports exactly how many replacements were made. Regex mode lets you use regular expressions as the search pattern, enabling complex find-and-replace operations — replace all ISO date formats, reformat phone numbers, strip all HTML tags — that a plain text search cannot handle. Everything runs locally in your browser.

lightbulb When to use this tool

  • check_circle Replacing every occurrence of an old company name, domain, or API endpoint across a copied configuration block.
  • check_circle Changing a variable name consistently across a pasted code snippet before it goes into a file.
  • check_circle Doing bulk text cleanup on a pasted document — changing all double spaces to single, replacing em-dashes with hyphens, normalising line endings.
  • check_circle Using regex mode to do pattern-based replacements — strip HTML tags, reformat dates, extract and rearrange fields.
  • check_circle Quick find-and-replace on content before pasting into a CMS, email template, or presentation.

Why use our tool?

Plain Text and Regex Mode

In plain text mode, the search term is treated as a literal string — every exact character match is replaced. In regex mode, the search term is treated as a regular expression, enabling pattern-based replacements: replace all strings matching a date pattern, strip all HTML tags with a single replacement, or capture and rearrange parts of a pattern using capture groups in the replacement string (\$1, \$2).

Case Sensitivity and Whole-Word Options

Case-sensitive mode: 'API' matches only 'API', not 'api' or 'Api'. Case-insensitive mode: matches all case variants. Whole-word mode: searching for 'cat' matches only standalone 'cat', not 'concatenate', 'category', or 'scat'. These options mirror the options in VS Code's find widget and work as expected.

Match Count Reporting

After replacement, the tool reports the exact number of replacements made. This confirms the operation worked as expected and helps detect unexpected matches or missed occurrences — '47 replacements made' when you expected 3 might indicate the search term was too broad.

Undo / Restore Original

One click restores the original text in case the replacement produced unexpected results. No Ctrl+Z required — the original input is preserved in memory throughout the session.

Works on Any Text — Code, Prose, CSV, JSON

There are no restrictions on the type of text content. Paste code, prose, markdown, CSV, JSON, XML, configuration files, or any other text. The replacement runs on the raw text string.

How it works

1

Paste your text into the input area.

2

Enter the search term in the 'Find' field.

3

Enter the replacement text in the 'Replace With' field (leave empty to delete all occurrences).

4

Set options: case-sensitive, whole-word, or regex mode.

5

Click 'Replace All' — the modified text appears in the output area with a replacement count.

6

Click 'Copy Result' to copy the modified text, or 'Restore Original' to revert.

Examples

science Bulk Domain Replacement

Text: Config block with 23 occurrences of 'api.oldcompany.com'
Find: api.oldcompany.com | Replace: api.newcompany.com | Mode: Plain text, case-sensitive
Result: 23 replacements made — all references updated in under a second

science Strip HTML Tags (Regex Mode)

Find (regex): <[^>]+>
Replace: (empty)
Input: <p>Hello <strong>world</strong>, this is <em>italic</em> text.</p>
Output: Hello world, this is italic text.
Result: 5 replacements (5 tags removed)

Frequently Asked Questions

How do I use capture groups in regex replacement? expand_more
In regex mode, capture groups in the search pattern (parentheses) can be referenced in the replacement string using $1, $2 etc. (or \1, \2 in some conventions). Example: search pattern (\w+)@(\w+\.\w+) captures username and domain. Replacement $2/$1 would produce domain.com/username from user@domain.com. This enables rearranging captured portions of matched text into any order in the replacement.
Can I replace text with nothing (delete all occurrences)? expand_more
Yes. Leave the 'Replace With' field empty and click 'Replace All'. Every match is deleted — replaced with an empty string. This is useful for removing specific words, stripping HTML tags (with regex), deleting all occurrences of a pattern, or removing unwanted characters from data.
What does 'whole word' mode do? expand_more
Whole word mode adds word boundary markers (\b) around your search term, so it only matches the search term as a standalone word rather than as part of a longer word. Searching for 'cat' with whole word enabled matches 'cat' but not 'category', 'concatenate', or 'scatter'. This is particularly useful when replacing variable names in code where a short name might appear as part of longer identifiers.
Is there a character limit for the input text? expand_more
There is no hard limit imposed by the tool. The practical limit is your browser's available memory. For typical text operations — a few thousand to tens of thousands of words — performance is instantaneous. For very large text files (multiple megabytes), a code editor like VS Code with its built-in find-replace is more appropriate.

More Text Tools