Base64 to Hex
Converter
Convert Base64 encoded strings to hexadecimal and back. Inspect individual byte values, choose output formatting, and copy results instantly all privately in your browser.
Convert in Three Simple Steps
No sign-up, no server uploads. Paste, convert, and copy in seconds.
Paste Your Input
Paste a Base64 string into the input field. The tool accepts standard Base64 with or without padding whitespace is automatically stripped.
Choose Formatting
Select uppercase or lowercase hex, pick a separator (space, colon, dash, or none), and choose a byte grouping from individual bytes to octets.
Copy or Download
Copy the hex output to your clipboard in one click or download it as a .txt file. Use the Byte Inspector to drill into individual values.
A Complete Base64 ↔ Hex Toolkit
Flexible formatting, two-way conversion, and byte-level inspection in one private tool.
Flexible Hex Formatting
Choose uppercase or lowercase output, with space, colon, dash, or no separator. Group bytes by 1, 2, 4, 8, or produce a continuous hex stream.
Two-Way Conversion
Convert Base64 to hex and hex back to Base64. Accepts all common hex input formats spaced, colon-separated, dashed, or continuous.
Byte Inspector
Visualise every decoded byte with its hex value, decimal equivalent, and printable ASCII character. Instantly see how many printable vs non-printable bytes are present.
Swap Panels
One-click swap between input and output fields easily round-trip a hex string back to Base64 without switching tabs or copying manually.
Hex to Text Preview
In the Hex → Base64 tab, decode the hex bytes to readable text with one click useful for verifying that a hex string represents the ASCII content you expect.
100% Private
All conversions run locally in your browser using native JavaScript. Your data never leaves your device safe to use with hashes, keys, and binary payloads.
Base64 ↔ Hex in Action
Common conversions you can verify and copy right now.
Simple Text String
Base64 → HexMD5 Hash (Hex → Base64)
Hex → Base64SHA-256 Digest Segment
Base64 → Hex (uppercase, colon-separated)Binary File Magic Bytes
Base64 → Hex (file signature)89 50 4E 47 = PNG magic bytes · 0D 0A 1A 0A = CRLF + EOF marker
When You Need Base64 ↔ Hex
Hex is the native language of binary data these are the real workflows that bring the two formats together.
Cryptographic Hash Inspection
MD5, SHA-1, SHA-256, and other hashes are often returned as Base64 in API responses or stored in databases. Convert to hex to compare against known values in hex format.
File Magic Byte Detection
Identify file types by inspecting the first few bytes of a Base64-encoded file. PNG, PDF, JPEG, ZIP, and GIF all have distinctive hex signatures that reveal the true file type.
TLS Certificate & Key Debugging
X.509 certificates and cryptographic keys are commonly Base64-encoded (PEM format). Convert them to hex to inspect the underlying DER structure and byte layout.
Network Protocol Analysis
Packet payloads in tools like Wireshark are often displayed as hex. Convert Base64-encoded packet data to hex for direct comparison with captured traffic.
Firmware & Binary Patching
Embedded firmware or binary patches may be distributed as Base64. Convert to hex to identify offsets, instruction bytes, or patterns before applying patches.
Security Research & CTF
Capture-the-flag challenges frequently mix Base64 and hex encoding. Quickly convert between the two to identify hidden data, XOR keys, or shellcode sequences.
Base64 and Hex Two Views of the Same Bytes
Both Base64 and hexadecimal are encodings of binary data they represent the same underlying bytes in different text formats. Converting between them means decoding Base64 back to its raw bytes, then re-encoding those bytes as hex.
Each byte (8 bits, values 0–255) is represented as exactly two hex characters 00 through FF. Hex is therefore exactly twice as verbose per byte as the raw binary, but maps 1:1 without the 33% overhead that Base64 adds.
Hex is preferred for binary inspection because it maps directly to byte boundaries with no padding, making it easy to identify offsets, file signatures, and individual byte values at a glance.
Frequently Asked Questions
Everything you need to know about Base64 and hexadecimal conversion.
48656C6C6F), space-separated pairs (48 65 6C 6C 6F), colon-separated (48:65:6C:6C:6F), and dash-separated (48-65-6C-6C-6F). The tool strips all separators automatically before decoding. Mixed case is also accepted.89 50 4E 47. By converting Base64 file data to hex you can inspect these first bytes and verify the true file type even when the filename or MIME type is missing or incorrect.atob(), btoa(), and toString(16) functions. Nothing is transmitted anywhere. The tool works completely offline after the initial page load safe to use with cryptographic keys, hashes, and sensitive binary payloads.48), its decimal value (e.g. 72), and its printable ASCII character if it falls in the printable range 32–126 (e.g. H). Non-printable bytes show a · placeholder. The summary stats show total bytes, printable count, non-printable count, and unique byte count.