Tab vs Space Hash – Hidden Whitespace SHA-256 Difference

Local only

Show that tabs and spaces are different hash input bytes.

11 chars · 1 line

Waiting for input

Loading hash algorithms…

Whitespace and hashes

Do tabs and spaces hash differently?

Yes. A tab is a different control character from an ordinary space. Editors may align them similarly, but a digest is calculated from different bytes. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • MD5 text digests
  • SHA-1 text digests
  • SHA-256 text digests
  • SHA-512 text digests
  • Exact text byte sensitivity
  • Browser-local hashing

Steps

  1. Enable visible whitespace in the editor.
  2. Check whether separators are tabs or spaces.
  3. Normalize them only when the data format permits it.

Visual alignment does not define the byte sequence

A tab has its own code point and UTF-8 byte. One or more spaces use different bytes, so the resulting digest is different.

Tab vs space SHA-256

The first input contains a tab between the words; the second contains one space.

Input comparison

hello\tworld
hello world

SHA-256 digests

tab: 3c6a8408beade7815485a4af8c55c1adbf249dfe34087c7d3d887a9dc3b43d1b
space: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

Common questions

Frequently asked questions

Is a tab equivalent to four spaces for hashing?

No. Editor display width does not change the underlying character; a tab and spaces are different inputs.

Does VetaTool replace tabs before hashing?

No. The text is hashed as entered.

Debugging a specific Hash issue? Browse Hash troubleshooting.