Whitespace Visualizer

Show invisible characters — spaces, tabs, line endings, and trailing whitespace.

Hello·World¶
→	Indented·with·tab¶
··Two·spaces·here··¶
Trailing·spaces···↵↩
¶
Windows·line·ending
\u00b7 = space\u2192 = tab\u00b6 = LF\u21b5 = CRLF

Spaces

15

Tabs

1

LF

3

CRLF

1

Trailing

2

Lines

5

What It Does

Whitespace Visualizer makes invisible characters in text visible. Paste any text or code and see every space, tab, line ending, and non-printable character rendered as a distinct visible symbol. Essential for debugging whitespace-sensitive files, cleaning up copy-pasted content, and investigating line ending mismatches.

Character Reference

Common Use Cases

Fixing Whitespace Issues

Frequently Asked Questions

What is the difference between LF and CRLF line endings?
LF (\n, line feed) is the Unix/Linux/macOS standard. CRLF (\r\n, carriage return + line feed) is the Windows standard. Mixed line endings in a single file can cause issues with version control diffs, shell scripts, and certain parsers.
Why does trailing whitespace matter in code?
Trailing spaces and tabs are invisible but get captured in version control diffs, making code reviews noisy. Some languages like Python and Makefile have whitespace-sensitive syntax where unexpected trailing characters can cause errors.
How do I fix CRLF line endings on macOS or Linux?
Use the command: sed -i 's/\r//g' filename.txt to strip carriage returns. In VS Code, you can click the line ending indicator in the status bar to convert the whole file. Most editors also have a setting to enforce LF on save.
What is a non-breaking space and where does it come from?
A non-breaking space (U+00A0) looks identical to a regular space but behaves differently — text editors and parsers treat it as a non-whitespace character. It commonly appears when copying text from PDFs, web pages, or word processors.
How can I check for mixed tabs and spaces in my code?
Paste your code into the Whitespace Visualizer and look for a mix of tab markers and dot markers on the same indentation lines. Mixing tabs and spaces is a common source of IndentationError in Python.