# Base64 to Hex and Hex to Base64 Converter

URL: http://103.76.183.74:8106/base64-to-hex

Convert Base64 to hexadecimal and hex to Base64 online. Lowercase or uppercase, with or without spaces, 0x prefix or C array. Useful for hashes, keys and binary protocols.

Hashes, keys, certificates and binary protocols are written either as hex (0-9, a-f) or as Base64. Paste one and get the other, formatted the way your code or tool needs: plain, spaced bytes, 0x-prefixed or as a C / Java byte array.

## How to use it

1. Choose Base64 -> Hex or Hex -> Base64.
2. Paste your value (spaces, colons and 0x prefixes in hex are ignored).
3. Pick a hex format and copy the result.

Everything runs in the browser: the data is never uploaded to Base64 Studio.

## Questions

### Why convert a hash between hex and Base64?

Tools disagree: openssl and most logs print SHA-256 as hex, while HTTP headers such as Content-Digest, SRI integrity attributes and many APIs use Base64.

### How long is a SHA-256 hash?

32 bytes: 64 hex characters or 44 Base64 characters (with one = of padding).

### Are uppercase and lowercase hex the same?

Yes. Hex is not case-sensitive; choose the style your system prints.

### Is my data uploaded to a server?

No. Every conversion on this page runs inside your browser with JavaScript. Your text and files never leave your computer, which is why it also works for private keys, contracts and photos.

### Is the tool free?

Yes, free without sign-up and without limits other than your computer's memory. The site is paid for by the small ads on the left and at the bottom.

## Related tools

- [Base64 Encode - Text to Base64](http://103.76.183.74:8106/base64-encode)
- [Base64 Validator and Inspector](http://103.76.183.74:8106/base64-validator)
- [Base64URL Encoder, Decoder and Converter](http://103.76.183.74:8106/base64url)
- [File to Base64 Converter](http://103.76.183.74:8106/file-to-base64)
