Skip to content

Find and Replace Text

Replace the first or every literal text match with optional case sensitivity, without regular-expression surprises or uploads.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Paste or type the source text.
  2. 2.Enter literal find and replacement values, then choose case sensitivity and first or all matches.
  3. 3.Run the replacement and verify the reported count and exact preview.

About Find and Replace Text

Find and Replace Text changes literal matches inside pasted text. Enter up to 1,000,000 characters, specify the text to find and its replacement, choose case-sensitive or case-insensitive comparison, and select whether to replace the first match or every non-overlapping match. The result reports how many replacements were made and previews the exact transformed string. All work runs locally in the browser and no text is uploaded to Lizely.

The find value is literal, not a regular expression. Periods, asterisks, brackets, parentheses, dollar signs, backslashes, and other punctuation match themselves without escaping. Replacement text is also literal, so dollar patterns and backreferences have no special meaning. This avoids accidental pattern behavior and makes the operation predictable for prose, code fragments, IDs, delimiters, filenames, and logs.

Replace all uses non-overlapping matches. Searching for aa in aaaa and replacing it with X produces XX, because the first match consumes positions zero and one and the next consumes positions two and three. The tool never loops on text it just inserted. Replace first stops immediately after the earliest match and appends the untouched remainder.

Case-sensitive mode compares the strings exactly. Case-insensitive mode uses English-locale lowercase copies for matching but slices and preserves unmatched characters from the original text. It does not perform accent folding, Unicode normalization, fuzzy matching, stemming, locale-specific collation, or whole-word detection. Case-insensitive replacements therefore provide practical English behavior rather than a universal linguistic equivalence system.

An empty find value is rejected because matching an empty string at every boundary is ambiguous. An empty replacement is allowed and acts as literal deletion. A find value longer than the remaining text returns zero replacements. The one-million-character input bound keeps browser processing and result rendering responsive. Editing any control clears the old result so stale output cannot be confused with the current settings.

Source whitespace, tabs, and line breaks remain unless they are part of an exact match. The tool does not trim, reflow, normalize line endings, sort lines, or mutate the input textarea. The output preview preserves whitespace while allowing long lines to wrap visually. A visual wrap does not create newline characters in the underlying result.

The replacement count is based on completed literal matches. Zero is a valid result and returns the original text unchanged. Positions are not displayed because replacements can change later offsets; use Count Occurrences first if original match positions are needed. There is no undo stack inside the generated preview, but the unchanged source remains available above for another run.

Use this tool for renaming tokens in copied configuration, updating repeated phrases, removing a delimiter with an empty replacement, changing tags, or making a controlled case-insensitive substitution. It does not edit uploaded files, Word documents, PDFs, or multiple tabs. It also does not support regular expressions, capture groups, wildcards, whole words, or replacement templates. Those advanced modes require a separate interface with explicit safety and syntax documentation.

Because processing is deterministic and network-free, the same browser strings and options produce the same result. The tool does not store history or send analytics containing the source. Copy the preview through the browser or continue with another dedicated text tool. For line-level affixes use Add Prefix and Suffix; for newline syntax use Line Break Converter; for counting before modification use Count Occurrences.

Methodology & sources

Validate bounded source and non-empty literal find text, optionally lowercase comparison copies with the English locale, locate the next literal match from the current offset, append untouched original slices plus literal replacement text, advance by the full find length, stop after one match or continue non-overlapping, append the remainder, and report the completed count.

Frequently asked questions

Does find text use regular expressions?
No. Both find and replacement values are literal, so punctuation and dollar signs have no special syntax.
Can replacement text be empty?
Yes. An empty replacement deletes each selected literal match.
Are overlapping matches replaced?
No. Replace all advances past each complete match, preventing inserted text from being searched again.
Is my text uploaded?
No. Matching, replacement, counting, and preview rendering happen locally in the browser.

Text Tools guides

View all