Whitespace Visualiser
Redraw pasted text so tabs, trailing spaces, line endings and characters you cannot see all become visible.
What this tool does
Whitespace Visualiser renders your text with every blank character made explicit. An ordinary space becomes a middle dot, a tab becomes an arrow, a line feed becomes a pilcrow, a Windows CRLF becomes ␍¶ and a lone carriage return becomes ␍ on its own, so the line endings in a file announce themselves instead of having to be inferred. Numbered lines sit in a gutter down the left, and a legend above the text names each marker that is currently switched on.
Characters with no width of their own get separate treatment: each one is replaced by a red badge carrying a short label, and hovering that badge names the character in full. The list is fixed and specific — the no-break space, the Ogham space mark, the en-quad to hair-space range, the narrow and medium mathematical spaces, the ideographic space, zero-width space, zero-width joiner and non-joiner, the word joiner, a byte-order mark, the soft hyphen, the left-to-right and right-to-left marks, the Unicode line and paragraph separators, and the control codes NUL, vertical tab, form feed and next line. Everything found is also listed underneath in a table giving the marker, the character's name, its code point in U+ notation and how many times it occurred.
Trailing whitespace is highlighted rather than merely marked, in a warning colour that runs from the first stray character to the end of the line, though a hidden character sitting inside that run keeps its red badge instead of the highlight. The summary under the output counts spaces, tabs and hidden characters, and names the line endings — LF, CRLF, CR, or a mixture reported as LF + CRLF when a file has been edited on two platforms. Spaces, tabs, hidden characters and line endings are tallied whether or not their marker is switched on, so turning one off only quietens the display. Trailing whitespace is the exception: its checkbox gates the detection itself, so switching it off zeroes the trailing-line figure as well as removing the highlight.
What it will not do is fix anything. The output is a view, not a document, and the marked-up text is never what Copy output puts on the clipboard: when hidden characters were found the button hands over that table as CSV — marker, name, code point and count — and when none were found it hands over nothing at all. Changing the text is a separate job — Remove Extra Spaces collapses runs of spaces and deletes zero-width characters, and Find and Replace handles a targeted substitution. Only the characters in the list above are named, so other control codes, variation selectors and combining marks pass through drawn as they are. A tab is shown as an arrow with a thin space after it rather than expanded to the next tab stop, so columns in a tab-separated table will not line up on screen. Text is pasted in — there is no file picker — and anything longer than two million characters is refused. All of the marking happens in this browser tab, so the text is not uploaded and the tool still works with the network off.
How to use it
- Paste the text you are suspicious of. Type or paste it into the input box, or press Load sample for a short block that already carries a tab, a trailing space, a no-break space, a zero-width space and a stray Windows line ending.
- Choose what gets marked. Six switches: ordinary spaces, tabs, line endings, trailing whitespace, non-breaking and zero-width characters, and line numbers. All six start on — turn off whichever ones make the display noisy for what you are actually hunting.
- Read the marked-up output. The legend above the text says what each marker means. A hidden character appears as a labelled badge such as NBSP or ZWSP, and hovering it gives the full name.
- Check the summary and the table. The line beneath the output gives the totals and the line-ending mix. Anything invisible that was found is listed by name, code point and count.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
The tab vs space argument in a code review
Two people looking at the same diff can be seeing different indentation. Marking both settles which lines use which before anyone edits the file.
A string comparison that keeps failing
A no-break space pasted out of a web page or a spreadsheet looks exactly like a space and matches nothing. Here it is a labelled badge rather than a mystery.
A CSV or config file a parser rejects
A byte-order mark at the start of the file becomes a labelled badge on line one, and a lone CR left by an old editor is drawn as ␍ with the summary reporting CR line endings.
Copy checked before it is published
Soft hyphens and zero-width joiners survive a copy out of a design tool or a CMS, then quietly break search and sorting once the text is live.
Questions
Does the text I paste leave this page?
Can it clean the text as well as show invisible characters?
Which characters count as hidden?
Why do my columns not line up in the output?
What does LF + CRLF in the summary mean?
How much text can it take at once?
Related tools
- Word Counter — Count words, characters, sentences and reading time.
- Case Converter — Switch between upper, lower, title, camel and snake case.
- Remove Line Breaks — Collapse hard wraps back into flowing paragraphs.
- Remove Extra Spaces — Normalise double spaces and stray whitespace.
- Sort Lines — Sort lines alphabetically, numerically or randomly.
- Remove Duplicate Lines — Delete repeated lines from a list.