Base64 to Hexadecimal Converter
Decode Base64 strings to hexadecimal representation with formatting options
Drop a Base64 string in, get hex bytes out — uppercase, lowercase, spaced, or 0x-prefixed, however you need them. Handy when you're debugging a JWT signature, inspecting certificate fields, or comparing encoded payloads byte by byte. And everything runs in your browser. Nothing gets uploaded.
How It Works
Each Base64 character maps to a 6-bit value. The tool groups those bits into 8-bit bytes, then converts each byte to its two-character hex equivalent. A 4-character Base64 chunk becomes 3 bytes, which becomes 6 hex digits. Padding characters (=) at the end just signal that the last group has fewer than 3 bytes.
Examples
Short text string
Converting a Base64-encoded "Hello" to its hex representation.
SGVsbG8=
48 65 6C 6C 6F
API authentication token
You pulled a token from an API header and need hex bytes for debugging a signature mismatch. The raw bytes tell you exactly what the server signed.
dGhlIHF1aWNrIGJyb3duIGZveA==
74 68 65 20 71 75 69 63 6B 20 62 72 6F 77 6E 20 66 6F 78
Binary data from a certificate file
SSL certificate fields are often Base64-encoded in PEM files. Converting to hex lets you inspect ASN.1 structures byte by byte — useful when a cert isn't parsing correctly and you need to find where the encoding breaks.
AQIDBA==
01 02 03 04
Who Uses This
Debugging encoded payloads in APIs, JWTs, and WebSocket messages by inspecting the raw bytes.
Examining encoded data in network captures, certificate fields, and authentication tokens.
Learning how Base64 encoding maps to actual byte values in computer science and cryptography classes.
Comparing encoded config values against expected hex patterns when troubleshooting device firmware.
Common Mistakes
If your input already looks like "4A 6F 68 6E", that's hex — not Base64. Base64 strings only contain letters, numbers, +, /, and = padding. Feeding hex into a Base64 decoder gives garbage output.
Data URIs start with something like "data:image/png;base64,". Strip everything before and including the comma. The prefix isn't part of the Base64 data and will cause a decode error.
URL-safe Base64 uses - and _ instead of + and /. Most tools handle both, but if you see unexpected results, check which variant your source data uses. JWT tokens, for example, always use the URL-safe version.
Technical Details
- Processing: 100% client-side — nothing leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Input Format: Standard Base64 (RFC 4648) and URL-safe Base64
- Output Formats: Uppercase/lowercase hex, with optional space or colon separators
- Max Input: Limited only by browser memory
Frequently Asked Questions
What is the difference between Base64 and hexadecimal?
Base64 encodes binary data using 64 printable ASCII characters, making it about 33% larger than the original. Hex represents each byte as two characters (0-9, A-F), so it doubles the size. Base64 is more compact for transmission; hex is easier to read byte-by-byte when debugging.
How do I convert Base64 to hex manually?
Take each Base64 character, look up its 6-bit value in the Base64 alphabet table, concatenate all the bits, then split them into 8-bit groups. Each 8-bit group is one byte — convert that to two hex digits. For "SGk=" you'd get S=18, G=6, k=36 in binary, which gives bytes 0x48 0x69, spelling "Hi".
Can I convert hex back to Base64?
Yes, it's the reverse process. Take each pair of hex digits, convert to a byte, then re-encode the byte array as Base64. We have a separate hex-to-Base64 converter on this site if you need to go the other direction.
Why does my Base64 string have = signs at the end?
The = signs are padding. Base64 works in groups of 3 bytes (4 characters). If your data isn't evenly divisible by 3, padding fills the gap. One = means two bytes in the last group; two == means one byte. Some systems skip the padding entirely — both work fine here.
Is my data safe when using this tool?
Your data stays on your machine. The conversion runs entirely in JavaScript inside your browser — nothing is sent to a server. You can disconnect from the internet and the tool still works. No cookies, no tracking, no server logs.