Glyph WidgetsGlyph Widgets
AboutContactBlogPrivacyTermsSupport on Ko-fi

© 2026 Glyph Widgets. All rights reserved.

·

100% Client-Side Processing

Back to Blog

Find and Replace: Bulk Edit Text Online

Find and replace text online with regex, case sensitivity, whole word, and replace-all options. Real-time match count preview.

Glyph Widgets
February 27, 2026
11 min read
find and replacesearch and replacetext replaceregex replacefind replace online

What Is Find and Replace?

Find and Replace is a free online tool that searches for text patterns within a block of content and replaces them with a new string. It is the standalone, browser-based equivalent of the find/replace dialog in a code editor or word processor — useful when you are working with text outside those applications, need regex support without opening an IDE, or want to apply a series of substitutions to pasted content.

The tool supports literal text search, full regular expressions, case-sensitive and case-insensitive matching, whole-word boundary enforcement, and a choice between replacing the first match only or all matches. A match count is displayed in real time as you type, and the result is previewed before you apply or copy it. All processing runs in your browser. The tool is free with no account required.

Key Features

  • Literal text search — Finds the exact string you type in the Find field, with all special regex characters escaped automatically.
  • Regular expression support — Toggle the Regex option to use full JavaScript regex syntax in the Find field. The u (Unicode) flag is always applied.
  • Case sensitive/insensitive — By default the search is case-insensitive. Enable Case Sensitive to restrict matches to the exact case entered.
  • Whole word matching — When enabled, the tool wraps the search pattern in Unicode-aware negative lookbehind and lookahead assertions ((?<![\\p{L}\\p{N}]) and (?![\\p{L}\\p{N}])), so cat does not match inside concatenate.
  • Replace first or all occurrences — The Replace All button (active by default) applies the replacement globally. Toggle it off to replace only the first match.
  • Match count preview — Shows the number of matches found in real time as you type in the Find field. The count is green when matches exist.
  • Apply to input — The Apply Replace button commits the result back to the input field, letting you chain multiple replacements sequentially.
  • Copy result to clipboard — One-click copy of the result text.
  • Batch replace mode — Define up to 20 find/replace pairs and run them all in sequence against a single text (built-in feature, separate from the supporter batch mode).
  • Supporter batch mode — Apply the current single find/replace operation across multiple independent text items at once.

How to Use Find and Replace

Step 1: Enter Your Text

The tool has two modes selectable at the top: Single (default) and Batch. In Single mode, paste your text into the large Input textarea on the left side of the page.

Step 2: Enter the Find Pattern

Type the text you want to find in the Find input field. For literal search (default), type exactly what you want to match. For example, to replace all occurrences of colour with color, type colour in Find.

If the Regex option is active, the Find field accepts any valid JavaScript regular expression pattern. For example, \d{4}-\d{2}-\d{2} matches ISO date strings.

The match count appears to the right of the options buttons as soon as at least one match is found.

Step 3: Enter the Replacement

Type the replacement string in the Replace With input. Leave it empty to delete all matches. In regex mode, capture group references like $1 and $2 are supported in the replacement string.

Step 4: Configure Options

Four toggle buttons control search behavior:

OptionDefaultEffect
RegexOffTreat Find field as a regular expression
Case SensitiveOffMatch only exact case
Whole WordOffMatch only at word boundaries
Replace AllOnReplace every match; off replaces only first

Note: Whole Word is disabled (greyed out) when Regex is active, because regex patterns manage their own boundary assertions.

Step 5: Review the Preview

The Output (Preview) panel on the right updates in real time. Review the result before committing anything.

Example — literal replacement:

Input: The colour of the wall matches the colour of the door. Find: colour Replace: color Replace All: on

Output: The color of the wall matches the color of the door. Match count: 2 matches found

Step 6: Apply or Copy

  • Apply Replace — Moves the result back into the input field, clearing the preview. Use this to chain replacements: apply the first change, then type a new Find pattern for the next pass.
  • Copy Result — Copies the preview output to the clipboard without modifying the input. Use this when you want to keep the original text in the input for reference.
  • Clear — Empties the input, Find field, Replace field, and clears errors.

Using Batch Replace Mode

The built-in Batch Replace mode (separate from the supporter batch feature) lets you define up to 20 find/replace pairs and run them all sequentially against the same input text.

Step 1: Switch to Batch Mode

Click the Batch Mode button at the top of the tool. The UI changes to show the input textarea, a table of find/replace pairs, and a Run button.

Step 2: Define Pairs

Each row in the pairs table has:

  • A Find field
  • A Replace field
  • A .* button to toggle regex for that individual pair
  • An ON/OFF toggle to enable or disable the pair without deleting it
  • A × button to remove the pair

Click Add Pair to add more rows (up to 20). The pairs are applied in order, top to bottom. The output of pair 1 becomes the input to pair 2.

Step 3: Run All Replacements

Click Run All Replacements. The tool processes each enabled pair in sequence and shows the final result in the output textarea. A total replacement count is displayed (e.g., "7 total replacements made").

Each pair row shows its individual match count after processing.

Example use case: Normalize a CSV export. Pair 1: find " → replace empty (strip quotes). Pair 2: find (double space) → replace (single space). Pair 3: find ,\n → replace , (rejoin wrapped lines). Run all three in sequence.

Practical Examples

Replacing All Instances of a Deprecated Function Name

You have a JavaScript snippet that uses oldFunctionName() throughout. Find: oldFunctionName, Replace: newFunctionName, Replace All: on. The preview shows all occurrences updated; Apply commits the change.

Extracting and Reformatting Dates with Regex

Your log file contains dates in the format 2025-12-31. You want to reformat them to 31/12/2025. Enable Regex, Find: (\d{4})-(\d{2})-(\d{2}), Replace: $3/$2/$1, Replace All: on. The capture groups are swapped in the replacement.

Removing a Repeated Prefix

You have 40 lines each starting with ERROR: . Find: ERROR: , Replace: empty, Replace All: on. One click removes the prefix from every line.

Tips and Best Practices

Use Apply Replace to chain operations. After clicking Apply, the result becomes the new input. You can then enter a new Find pattern for a second pass without leaving the tool. This is faster than copying, pasting back, and re-running.

The u flag is always active. The tool constructs regex patterns with the Unicode flag (u) always included. This ensures Unicode property escapes like \p{L} and \p{N} work correctly in regex mode.

Whole Word uses Unicode-aware boundaries. The standard \b word boundary anchor in JavaScript only works with ASCII characters. This tool uses Unicode property lookbehind and lookahead ((?<![\\p{L}\\p{N}])...(?![\\p{L}\\p{N}])) to handle word boundaries correctly in multilingual text.

Leave Replace With empty to delete matches. An empty Replace field is valid. All matches are removed from the text, which is useful for stripping tags, removing unwanted characters, or deleting entire patterns.

Batch pair order matters. Pairs in Batch Replace mode are applied sequentially. If pair 1 produces output that pair 2 would also match, pair 2 will act on that transformed text. Plan your pair order accordingly.

Invalid regex shows an error, not a crash. If you type an invalid regex in the Find field with Regex enabled, the tool catches the error, displays "Invalid regular expression" below the options row, and returns the original input unchanged. Fix the pattern and the error clears automatically.

Common Issues and Troubleshooting

"Invalid regular expression" error. The Find field contains a regex syntax error. Common causes: unmatched parentheses, invalid quantifier syntax (e.g., {3,1} where minimum exceeds maximum), or an invalid escape sequence. Fix the pattern and the error clears.

Whole Word option is greyed out. Whole Word is disabled when Regex mode is active. This is intentional — when writing your own regex, you control word boundaries directly in your pattern. Disable Regex to use the Whole Word toggle.

Replace All is on but only the first match is being replaced. Check that the Replace All button is highlighted (active state). If it appears as an outline button, it is inactive and only the first match will be replaced. Click it to activate.

Match count shows 0 but I can see the word in the text. Check Case Sensitive — if it is on, the case of the Find text must exactly match the case in the input. Also verify there are no leading or trailing spaces in the Find field that would prevent a match.

The Apply button is disabled. Apply is only enabled when replacedCount > 0, meaning at least one replacement would actually be made. If the Find pattern matches nothing, Apply stays disabled. This prevents accidentally applying a no-op.

Batch mode total count is 0 but pairs are filled in. Ensure each pair's ON/OFF toggle shows ON. Disabled pairs (showing OFF) are skipped. Also confirm the input textarea in batch mode has content.

Privacy and Security

Find and Replace runs entirely in your browser. The findAndReplace function uses JavaScript's native String.replace() and RegExp constructor — no external services are contacted. Your text and your find/replace patterns are never transmitted to any server. The tool works offline once the page has loaded.

Frequently Asked Questions

Is Find and Replace free? Yes, completely free. All single-mode features (literal, regex, case, whole word, replace all/first, match count, apply, copy) and the built-in batch replace mode (up to 20 pairs) are free with no account required. The supporter batch mode (processing multiple input texts at once) requires a Glyph Widgets supporter subscription.

Does it work offline? Yes. Once the page loads, all processing is local JavaScript. No internet connection is needed.

Is my text safe? Your text never leaves your browser. No server receives your input text or your find/replace patterns. Nothing is logged or stored externally.

Does regex mode support capture groups in the replacement? Yes. JavaScript's String.replace() supports $1, $2, etc. in the replacement string to reference capture groups in the pattern. Named capture groups referenced via $<name> are also supported.

What regex flags are used? The u (Unicode) flag is always applied. Case Sensitive controls whether the i flag is included (off = i included, case-insensitive; on = no i, case-sensitive). Replace All controls whether the g flag is included.

Can I use lookaheads and lookbehinds in regex mode? Yes. JavaScript supports lookahead ((?=...), (?!...)) and lookbehind ((?<=...), (?<!...)) assertions in modern browsers. The Unicode flag (u) is active, so Unicode property escapes (\p{L}, \p{N}) also work.

How many pairs can I use in Batch Replace mode? Up to 20 pairs. The Add Pair button is disabled when 20 pairs are already present. Pairs can be individually disabled with the ON/OFF toggle rather than deleted if you want to preserve them for later.

What happens if a regex in a Batch Replace pair is invalid? The invalid pair is silently skipped (caught with a try/catch block). Its match count shows as 0 or null. Other pairs continue to process normally. Fix the regex in the pair row to include it in the run.

Can I apply regex replacements across the same text multiple times? Yes. In Single mode, use Apply Replace to commit each replacement back to the input, then enter a new Find pattern. In Batch Replace mode, define all your patterns as separate pairs and they are applied sequentially in one click.

Is there a character limit on the input? No hard limit is enforced by the UI. Very large texts (hundreds of thousands of characters) may cause slower real-time preview updates on older devices, but the tool will still process them.

Related Tools

  • Case Converter — Convert text case formats; combine with find/replace for complex text normalization.
  • Duplicate Line Remover — Remove repeated lines from text after substitutions.
  • Word Counter — Count occurrences and word frequency in your text.

Try Find and Replace now: Find and Replace

Last updated: February 27, 2026

Keep Reading

More ArticlesTry Find and Replace