How control-character removal works
The strip is a single regex: /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g. That matches every ASCII control code except tab (U+0009), line feed (U+000A), and carriage return (U+000D), plus the DEL character at U+007F. Each match is replaced with an empty string. Tabs and newlines are excluded because they are structurally meaningful in plain text; the rest of the control set is invisible noise from terminal escape sequences, BEL prompts, and old-style file formats.
Common offenders the pass catches: bell (U+0007, terminal beep), backspace (U+0008), vertical tab (U+000B), form feed (U+000C), escape (U+001B, the start of ANSI escape sequences), and DEL (U+007F). After this pass, the result is safe to feed into editors, JSON parsers, and other systems that may complain about stray control bytes.
Output is computed locally in your browser as one regex call. ANSI colour escape sequences (ESC [ 31 m and friends) start with U+001B but contain printable bytes after that. This pass strips the leading escape character; for full ANSI cleanup, follow with find and replace on the bracket sequences. For invisible Unicode characters above the ASCII range, use remove zero-width.
How to use remove control characters from text
- 1Paste text from a terminal, log file, or corrupted export into the input panel.
- 2Read the cleaned result on the right with control codes stripped.
- 3Confirm tabs and line breaks survived (visible in the input status bar).
- 4Click Copy to take the cleaned text.
- 5Run remove zero-width after if invisible Unicode also needs to go.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Strips ASCII control codes except tab, LF, CR
The match is /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g. Every C0 control code goes except tab (U+0009), line feed (U+000A), and carriage return (U+000D), plus DEL (U+007F). Common targets: bell, backspace, vertical tab, form feed, escape.
Tabs and newlines preserved
Structural whitespace stays in place. Tab characters survive, so column-aligned text keeps its layout. LF and CRLF line endings pass through, so paragraphs are unaffected. The input status bar shows which line ending was detected.
ANSI escape sequences partly handled
The escape character U+001B that starts every ANSI sequence is stripped, but the bracket and parameter bytes that follow (e.g. [31m) are printable and pass through. For complete ANSI removal, follow with find and replace on the bracket pattern \[\d+m.
Printable text and Unicode left alone
Letters, digits, punctuation, accented characters, CJK, emoji, and all printable Unicode pass through. The pass only targets ASCII control codes, so high-Unicode invisible characters like zero-width joiners are not removed; use remove zero-width for those.
Single regex, no upload
Implemented as one String.replace call. Evaluated in your browser on every keystroke. Linear time on huge inputs. Nothing about the text leaves the page, and no log of the input is kept on our side.
Worked example
Bell (U+0007), backspace (U+0008), and DEL (U+007F) are stripped; the line break between the two rows survives.
Hello world! More text here.
Hello world! More text here.
Settings reference
| Behaviour | Effect on output |
|---|---|
| ASCII control codes U+0000 to U+0008 | Stripped. Includes null, BEL, backspace. |
| Tab (U+0009) | Pass through. Column alignment is preserved. |
| Line feed (U+000A) and CR (U+000D) | Pass through. LF and CRLF line endings stay intact. |
| Vertical tab (U+000B), form feed (U+000C) | Stripped. Rare in modern text but found in legacy data. |
| Escape (U+001B) and other C0 controls | Stripped. ANSI escape leads vanish; printable parameter bytes survive (run find/replace for full ANSI strip). |
| DEL (U+007F) | Stripped. |
| Printable text and Unicode | Pass through. Use remove zero-width for invisible Unicode. |
FAQ
Will it remove tabs and newlines?
Does it strip ANSI colour codes from terminal output?
[31m) are printable and pass through. For complete cleanup, follow this pass with find and replace using the regex \[\d+m.