LESS REPETITION. CLEANER TEXT.

Find & Replace / Text Cleanup

Replace words, apply a sequence of rules or tidy pasted text. Keep your original beside the result, inspect matches and apply changes only when you’re ready.

Preview before applyingPlain text or regexLocal browser processing
Go to rules ↓

Rules run from top to bottom. Cleanup runs after all replacements. Your input stays unchanged.

View result ↑

1. Your original text

0 characters

Up to 300,000 UTF-16 units. Undo restores tool actions; use your browser’s undo shortcut for typing.

2. Preview your result

No preview yet

Downloads include the full result. An empty result is valid when your rules remove everything.

Paste text or try an example to get started.

Replacement rules

Leave Find empty to skip a rule. Leave Replace empty to delete matches. Later rules work on the previous rule’s result.

Advanced regex options & replacement syntax

Regular expressions use JavaScript syntax with Unicode matching. Enable capture replacements on a regex rule to use $1, $2, $& or $<name>. $$ inserts a dollar sign. JavaScript’s prefix/suffix tokens also work. Otherwise replacement text is literal, including dollar signs and backslashes. To match or insert a newline, enter an actual line break in the field. Processing stops after 2 seconds if a pattern is too expensive.

Cleanup shortcuts

Choose a shortcut or individual options, then preview. Shortcuts update cleanup options without changing your replacement rules.

Removing hidden spaces targets U+200B and U+FEFF. Emoji joiners and language joiners remain intact. Indentation and tabs change only if you select the corresponding cleanup options.

Find matches in the original

Preview changes to highlight the first active rule. Later rules may match text introduced by earlier rules.

What changed?

    Text and files are processed in a local worker without a processing upload. Ads and analytics follow the website’s privacy information.

    Using Find & Replace / Text Cleanup

    Replace repeated wording and tidy pasted text with a preview you can review before applying. Rules run in order, and cleanup runs after replacements. Your original remains editable beside the read-only result.

    1. Paste text, open a UTF-8 file or try an example. Add plain-text rules or select regular expressions when needed.
    2. Choose all matches or the first match per rule, case/whole-word matching and optional cleanup. Select Preview changes.
    3. Review the first rule’s highlighted original and the per-rule counts. Copy or download the full result, or apply it to your input. Undo restores the last tool action.

    Example

    Replace “colour” with “color” using whole-word matching. “COLOUR” also changes unless Match case is enabled, while “colourful” stays unchanged.
    Try cleanup on pasted text: trim line edges, collapse spaces/tabs and normalize line endings. Review before applying if indentation matters.
    Regex example: find (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}), replace with $<day>/$<month>/$<year>, and enable capture replacements. This reformats matching text; it does not validate calendar dates.

    Questions & answers

    Can I replace several words at once?

    Yes. Add up to 12 rules and reorder them. Rules run from top to bottom, so each rule sees the previous rule’s output. Cleanup runs after all rules.

    How does whole-word matching work?

    A match is accepted only when adjacent characters are not Unicode letters, combining marks, numbers or underscores. This prevents replacing “tool” inside “tools”. It is a character-boundary rule rather than a language-specific word dictionary.

    Are dollar signs and backslashes interpreted?

    Plain-text replacement is literal. Regex replacement is also literal unless Use capture replacements is enabled on that rule. With that option, JavaScript replacement tokens such as $1, $&, $<name> and $$ are interpreted. Enter actual line breaks to insert newlines.

    Can I run cleanup without a replacement rule?

    Yes. Leave Find empty and select cleanup options. Shortcuts replace the cleanup selection while preserving your rules. Indentation and tabs can change if you select trimming or horizontal whitespace collapse.

    Will removing hidden spaces damage emoji?

    This cleanup removes U+200B zero-width spaces and U+FEFF BOM characters. It preserves U+200D emoji joiners and U+200C language joiners. Unicode NFC normalization recomposes equivalent character sequences; it does not convert decorative fonts.

    Does preview change my original text?

    No. Only Use result as input applies the output. Undo restores the previous input and settings after tool actions such as apply, clear, examples, file opening and shortcuts. Use browser undo for typing edits.

    Why are highlights different from a later rule’s counts?

    Highlights show the first active rule on the original text. Later rules can match text created by earlier rules. Up to 200 matches are retained for highlighting, and the visual excerpt is limited to the first 12,000 UTF-16 units. The full result is downloadable.

    What limits apply?

    Input is limited to 300,000 UTF-16 units, with 12 rules, 20,000 total accepted matches and 1,000,000 output units. Processing stops after two seconds to prevent expensive regular expressions from blocking the page. Results larger than the input limit can be downloaded but cannot be applied as new input.

    Are my text and files uploaded?

    The tool processes input in a local browser worker without a processing upload or saved text history. Website advertising and analytics are described in the privacy information.

    Can the output be empty?

    Yes. Deleting every match can produce an empty valid result. You can download or apply that result. The JSON report contains rules, settings and counts; it does not include the full input or output.

    Help improve this tool

    Report a problem or suggest an improvement

    Describe the issue without pasting private tool input. Feedback goes to our admin inbox.

    Find another tool · Read practical guides