Whitespace Visualizer screenshot

Whitespace Visualizer

Reveal every space, tab and line ending in pasted text. Choose the glyph, set the tab width, and see exactly where the whitespace is.

Privacy First
0 Runs
Updated 2026-11-21
Runs in your browser
No sign-up, no upload

What the whitespace visualizer does

Every space in the text becomes one visible glyph, so two spaces in a row are two glyphs and a trailing space is no longer invisible. A tab becomes a tab mark followed by enough space glyphs to reach the tab width you set, which is how a tab of width 4 occupies four columns. Line endings are normalized to a single \n first, and the optional end-of-line mark puts a where each one was.

The chosen glyph is a display choice only: ·, ␣, _ and - stand for the same character. The page changes nothing about your text; it shows what is already there.

The cap is 200,000 characters, lower than the engine's 5 MB limit because the output is several times longer than the input.

How to use it

Paste the text into the text box. The visualization updates when you press Run.

Pick the glyph under Show each space as, and set the tab width from 1 to 8 columns. Tick Mark the end of every line with ¶ when trailing whitespace is what you are chasing.

Worked example

Input:

  two leading spaces
one	tab and  two  spaces

Output with the default middle dot and tab width 4:

··two·leading·spaces
one⇥···tab·and··two··spaces

Why it runs in your browser

The text is read and rewritten on this page with JavaScript. Nothing is posted to a server, so it works offline after the page loads and the text you paste is never stored anywhere.

Paste text and every space and tab becomes a visible glyph: two spaces in a row stop looking like one, and trailing whitespace stops hiding at the end of a line.

The default middle dot is a display choice. An open box, an underscore or a dash shows the same character, and the tab width control decides how many columns a tab occupies.

The page normalizes line endings before it displays them and can mark each one with a pilcrow. It changes nothing about your text, and it takes up to 200,000 characters at a time.

What it shows, and what it changes

Each space becomes exactly one glyph, so the output is a map of the input rather than a reformatting of it. Tabs are the one exception: a tab has a width, so it is shown as a tab mark plus enough space glyphs to reach the width you set. A tab of width 4 therefore occupies four visible positions, which is how it looks in an editor.

Line endings are normalized to a single newline before display, so a CRLF file and an LF file read the same. The optional end-of-line mark puts a pilcrow where each newline was, which makes a missing final newline and a trailing space on the last line easy to see.

The cap is 200,000 characters. A longer paste is refused with its length named, because the visual output is several times longer than the input and a page that freezes is worse than one that says no.

How to use Whitespace Visualizer

Paste the text into the text box and press Run. The visualization appears in the output box, one line per input line.

Choose the glyph under Show each space as, and set the tab width from 1 to 8 columns when the default of 4 does not match your editor.

Tick Mark the end of every line with ¶ when you are chasing trailing whitespace. The pilcrow then appears at the end of every line, including a final line that has no newline of its own.

What to Expect

Best for

  • Finding the trailing spaces that make a diff noisy
  • Showing a reviewer that two lines differ only in their whitespace
  • Checking whether a tab is one tab or four spaces

Not ideal for

  • Editing the text: the output is a display, not a new document
  • Files over 200,000 characters

What this tool keeps

  • Every character of the input, in order
  • The line structure, with CRLF normalized to one break

What may need cleanup

  • Tab columns are a display convention; another editor may use a different width
  • A glyph you copy out of the output is not the space it stands for

Common errors

  • Enter the text whose whitespace you want to see.
  • Tab width must be a whole number from 1 to 8
  • This page visualizes at most 200,000 characters at a time

Example use cases

  • Debugging indentation in a YAML or Python snippet
  • Proving that a CSV field has a trailing space
  • Teaching the difference between a tab and four spaces

Sample input

Two lines of text with leading spaces and a tab.

Sample output

The same lines with every space shown as a middle dot and the tab shown as a tab mark padded to four columns.

Who this is for

  • Developers comparing indentation
  • Anyone who has been told “it looks the same to me”

Frequently asked questions

Does this change my text?

No. The spaces and tabs are replaced only in the output you see. Nothing is written back to your input, and no file is produced.

Why is a tab shown as several characters?

A tab is a width, not a character you can see. The page draws a tab mark and then pads it with space glyphs to the tab width you chose, so a width of 4 occupies four columns.

What happens with Windows line endings?

CRLF and a lone carriage return are both normalized to a single newline before display, so the output has one line break where the input had one. Turn on the end-of-line mark to see exactly where each break falls.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.