Hash Converter

Hash Converter

Updated May 7, 2026

Convert a hash between hex and Base64, change its case, or add byte separators.

0 chars

Hex Input

Base64 Output

Format Reference

FormatCharactersExample
Hex (lowercase)0-9, a-f5d41402abc4b2a76
Hex (uppercase)0-9, A-F5D41402ABC4B2A76
Hex (separated)0-9, a-f, :5d:41:40:2a:bc:4b
Base64A-Z, a-z, 0-9, +, /, =XUFAKrxL

Features

  • Convert hash formats between Hexadecimal and Base64
  • Change casing (Uppercase/Lowercase)
  • Add or remove delimiter formatting (colons, spaces, `0x`)
  • Convert hash digests into raw binary strings
  • Client-side execution for immediate formatting

Common Use Cases

  • Formatting hashes to meet specific API or database requirements
  • Converting an SSL certificate fingerprint (e.g., `A1:B2:C3...`) into a continuous string
  • Translating a Base64-encoded digest sent in an HTTP header back to readable Hex
  • Standardizing log outputs for security information and event management (SIEM) systems

Understanding Hash Encodings

A cryptographic hash algorithm outputs raw binary data (a sequence of bytes). Because raw bytes cannot be easily displayed on a screen or typed into a JSON file, the binary data must be encoded into printable characters.

  • Hexadecimal (Hex): The most common encoding. It uses 16 characters (0-9, a-f). Each byte of the hash is represented by exactly 2 hex characters. A 32-byte SHA-256 hash becomes a 64-character hex string.
  • Base64: A more compact encoding used frequently in web protocols and APIs. It uses 64 characters (A-Z, a-z, 0-9, +, /). A 32-byte SHA-256 hash becomes a 44-character Base64 string ending with an = padding character.

Converting between Hex and Base64 does not change the actual hash value; it only changes how it is visually represented.

Examples

Valid - Hex to Base64 Conversion
Original (Hex): b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
Converted (Base64): uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=
Valid - Formatting a Fingerprint
Original: a3:b9:c1:4f:99
Converted (Raw Hex): a3b9c14f99

Frequently Asked Questions

Why does my API require a Base64 hash instead of Hex?

Base64 is roughly 33% more compact than Hexadecimal. When sending hashes in HTTP headers (like AWS S3's `Content-MD5` header), Base64 is preferred to save bandwidth and adhere to standard HTTP specifications.

Does changing the case of a Hex hash change its value?

No. In hexadecimal, `a` and `A` both represent the decimal number 10. `a1b2` is mathematically identical to `A1B2`. However, string comparison functions in programming languages will see them as different, which is why formatting is important.

πŸ’‘ Tips

  • If you see a string ending in `=` or `==`, it is almost certainly Base64 encoded. Convert it to Hex if you need to visually compare it to standard command-line tools like `sha256sum`.
  • When storing hashes in a database to save space, store the raw binary bytes (using `BINARY` or `BLOB` column types) rather than the Hex string. It uses exactly half the disk space.

Common Mistakes

Trying to "decrypt" a Base64 hash. Base64 is just an encoding; decoding it back to Hex does not reverse the hash function to reveal the original password.
Comparing a Hex-encoded string with a Base64-encoded string and assuming the underlying hashes are different.