What it does
Replaces every occurrence of a character (or sequence of characters) in a text with another one — entirely in your browser. Unlike a plain "find and replace" box, this tool understands special/whitespace characters that are otherwise impossible to type or paste directly, such as:
- Newline (
\n) - Carriage return (
\r) - Tab (
\t) - Null character (
\0) - Any character by its Unicode code point (e.g.
\u00A0for a non-breaking space)
You can also enable regular expression mode for more advanced pattern-based replacements.
Try it
How it works
- Your text and "find"/"replace" values never leave your browser — all processing happens locally in JavaScript.
- Find type controls how the "Find" field is interpreted:
- Special sequence — escape sequences like
\n,\t,\r,\0,\uXXXX, and\xXXare converted to their real character before searching. Anything else in the field is treated literally. - Literal text — the field is matched exactly as typed, no escape sequences are processed.
- Regular expression — the field is compiled as a JavaScript regular expression (without surrounding slashes), letting you use patterns like
\s+(any whitespace) or[aeiou](any vowel).
- Replace type works the same way for the replacement value (special sequence or literal text — regex isn't needed here since you're not matching, just substituting).
- If "Replace all occurrences" is checked, every match is replaced (equivalent to a global regex); otherwise only the first match is replaced.
- The result is displayed in the box below, exactly as produced — including any newlines/tabs it now contains (they'll render as actual line breaks/indentation since the box preserves whitespace).
Supported special sequences
| Sequence | Meaning |
|---|---|
\n | Line feed (newline) |
\r | Carriage return |
\t | Tab |
\0 | Null character |
\\ | A literal backslash |
\uXXXX | Unicode character by 4-hex-digit code point (e.g. \u00A0) |
\xXX | Character by 2-hex-digit code point (e.g. \x09 = tab) |
Common examples
- Convert Windows line endings to Unix: Find
\r\n, Replace\n. - Convert tabs to 4 spaces: Find
\t, Replace(literal text mode). - Strip all carriage returns: Find
\r, Replace with nothing (leave "Replace with" empty). - Collapse multiple blank lines: Find type "Regular expression" with
\n{2,}, Replace\n\n(special sequence mode).