PEM Decoder
A classic hexdump-style byte viewer for any PEM/base64/hex block, with hex/decimal/octal/C-array/binary exports and Shannon entropy.
What this tool does
Decodes a PEM block (or raw base64/hex, or an uploaded binary
file) down to its actual bytes and shows them as a classic
offset / hex / ASCII hexdump — the same three-column
layout tools like hexdump -C or xxd
produce — plus the same bytes re-exported in six other common
formats. This is a lower-level, byte-focused companion to this
site's PEM Formatter (which
builds/strips PEM text) and Certificate
/ DER Structure Viewer (which decodes the actual X.509 fields) —
this one is for looking directly at the raw bytes themselves.
Reading a hexdump
Each row shows a byte offset (in hex, from the
start of the data), up to 16 hex byte values split
into two groups of 8, and the same 16 bytes rendered as
ASCII on the right (a printable character where
one exists, a . where it doesn't). Key and certificate
bytes are mostly non-printable binary data, so the ASCII column
will mostly show dots — that's expected, not a sign anything is
wrong.
Export formats
Beyond the hexdump view: continuous hex (no
spaces, good for pasting into code), colon-separated
hex (the format openssl prints fingerprints
and serial numbers in), decimal CSV,
octal escapes (\NNN per byte, useful
for shell strings), a ready-to-compile C byte array
declaration, and a raw binary (0s and 1s) view.
Shannon entropy
A live Shannon entropy figure (0–8 bits per byte) measures how evenly the byte values are distributed. Real key and certificate material — DER-encoded, effectively compressed — typically sits close to 7.5–8 bits/byte. A much lower figure on something that's supposed to be key material is worth a second look; it can indicate accidental double-encoding, truncation, or that the input wasn't actually binary key data at all.
Printable-byte ratio
The percentage of bytes that fall in the printable ASCII range (0x20–0x7E). Genuine DER bytes are mostly non-printable, so this ratio is normally low (often under 20%) — a surprisingly high ratio usually means the "bytes" are actually still base64 or PEM text that didn't get decoded, rather than real binary.
Flexible input
Paste a full PEM block (headers are stripped automatically),
raw base64, or raw hex — the format is auto-detected — or
drag-and-drop / upload a binary file directly, read byte-for-byte
via FileReader rather than as text.
Large inputs
Hexdump and binary views are capped at the first 64 KB to keep the page responsive on an unusually large file; every export format states clearly when it's showing a truncated view.
Privacy
Everything — decoding, hex dumping, entropy calculation — happens entirely in your browser. Nothing is uploaded; there is no server component to this tool.