Paste a Base64 string and read the same bytes as hex, two digits to a byte, ready to set beside a checksum.
FluffyShieldProtected workspace
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
Why is the hex fingerprint so much longer than the Base64 one?
It's the same 32 bytes, the small numbers a file is stored as, written with a smaller alphabet. Hex, short for hexadecimal, has 16 characters and Base64 has 64, so a SHA-256 fingerprint takes 64 characters one way and 44 the other.
FluffyBench · 4 min read · Reviewed
From Base64 to hex
Undo the Base64 to get the bytes back
→Write each byte as a pair of hex digits
→Run the digits together in capitals
What it does
Zero bytes keep their place
AAEC/w== comes out as 000102FF: the leading zero byte is written 00, not dropped.
Wrapped Base64 is fine
A string broken over several lines converts as if it were on one.
Limits Both Base64 alphabets convert: - and _ are read like + and /.
A fingerprint you can't compare by eye
A web page that loads a script can say which script it expects with an integrity value like sha256-PAy4xNzr3Lz…: the word sha256, a hyphen and the file's SHA-256 in Base64. A SHA-256 is a fingerprint worked out from a file, and it changes completely if a single byte of the file does.
You download the script, work out its fingerprint with a checksum tool such as FluffyBench Hash checksum, and the two look nothing alike: one is a run of capitals, small letters and the odd slash, the other is digits and the letters a to f, and it's longer. Nothing is wrong. Checksum tools write the fingerprint in hex. Here is one fingerprint both ways, from a photo we keep for testing.
Base64 and hex
The marked starts, PAy4 and 3C0CB8, are the same first three bytes. How we checked
Why one is 64 characters and the other 44
A SHA-256 is 32 bytes. Hex has sixteen digits, 0 to 9 and A to F, and writes each byte as a pair of them, so the 32 bytes take 64 characters, always twice the byte count. Base64 has 64 characters to choose from, enough to fit three bytes into four of them. 32 bytes are 10 groups of three with 2 over, so it takes 44 characters, the last an = sign that fills out the short final group.
It's like writing a sum of money in pounds or in pence: the figures change length, the amount doesn't. That's also why converting can't lose anything. Each full group of four Base64 characters turns into exactly six hex digits, and you can see it at the start of the two in the drawing.
Turning the Base64 into hex you can check
The result box says Base16 because that's RFC 4648's name for hex; FluffyBench's Base encoder and decoder uses the same name.
Paste the fingerprint into the Input box, leaving out any sha256- in front of it.
Copy the hex from the Base16 box, which a phone keeps behind the Result tab.
Pasted whole, the integrity value is read as web-safe Base64: the hyphen after sha256 is taken as part of the value, so the result is not the fingerprint. Remove the sha256- prefix first.
The hex comes out in capitals; Hash checksum prints small letters. That doesn't matter: a hex digit means the same in either case, and Hash checksum's Expected checksum box ignores case, so you can paste the converted fingerprint straight in beside the file and let it say whether they match.
If you need more than the bytes
The Base64 holds words, and you'd like to read them