Base64 ↔ Hex
This free Base64 to hex converter translates between Base64 and hexadecimal encodings in both directions. Both formats represent the same underlying bytes in different ways, so conversions are exact and lossless.
How Base64 and Hex Are Related
Base64 and hex are both encodings for raw bytes. Base64 packs three bytes into four characters using a 64-character alphabet, which makes data compact but not human-readable. Hex writes every byte as two characters, which is longer but easy to inspect.
For the example input SGVsbG8sIFdvcmxkIQ==, decoding the Base64 produces the bytes that make up Hello, World!, and those same bytes are 48656C6C6F2C20576F726C6421 in hex. The two forms always describe identical data.
- Base64 encodes bytes into a 64-character alphabet with padding = signs.
- Hex encodes each byte as two characters: 0-9 and A-F.
- Conversion between them is lossless in both directions.
- This tool decodes on the fly as you type.
When to Convert Between Base64 and Hex
Developers meet this conversion when data travels between formats: an API returns Base64 but your debugger wants hex, or a hex payload needs to be embedded in a text-friendly Base64 field. This converter handles both directions instantly.
Use the Swap button to exchange the two fields, and the copy buttons to grab either result for pasting into your tools or code.