TXT · Text & Data tools

ASN.1 DER Decoder

Input encoding
Indent
Or load a file
Encoded bytes
Decoded
ASN.1 / DERformat0 Binput0lines out0chars out
Open the full binary format decoder with every format and the encoder

Shareable link

Settings are written to the URL as you change them. Nothing differs from the defaults yet.

Tag, length, value

DER encodes everything as an identifier byte, a length, and a value, nested as deep as the document needs. The identifier carries the class, whether the value is constructed, and the tag number. That is the entire grammar, which is why a single decoder handles certificates, keys, PKCS#7 bundles, OCSP responses, and SNMP packets alike.

Constructed values keep their name in the output. A certificate reads as nested SEQUENCE and SET entries with [0] for context-specific tags, matching the structure in RFC 5280 rather than flattening into anonymous arrays.

Wrapped structures

A BIT STRING or OCTET STRING often holds another DER document. A SubjectPublicKeyInfo ends in a bit string that is really a SEQUENCE of modulus and exponent, and a PKCS#8 private key wraps the whole key material in an octet string.

Both are expanded in place when their contents parse cleanly, so an RSA key decodes down to its modulus, public exponent, primes, and CRT coefficients without a second pass.

Certificate fields worth finding

The serial number is the first INTEGER inside the inner SEQUENCE. Validity is two time values, UTCTime before 2050 and GeneralizedTime after, both converted to ISO timestamps here. Subject and issuer are sequences of sets, each holding an OID and its string value, which is why a common name sits three levels deep.

Extensions live under [3], each one a sequence of an OID, an optional critical boolean, and an octet string holding the extension’s own DER.

Indefinite lengths

Strict DER always states a length, but BER allows an indefinite form terminated by two zero bytes. PKCS#7 signatures produced by some signing tools use it. Both forms decode here, so a bundle that other parsers reject on the first byte still opens.

Frequently Asked Questions

Yes. The BEGIN and END lines are stripped and the Base64 between them is decoded, so a certificate or key copied from a terminal works as it is.

Well known ones are. 1.2.840.113549.1.1.11 prints as sha256WithRSAEncryption and 2.5.4.3 as commonName. Anything unrecognised keeps its dotted number.

Values wider than 8 bytes print as hex with their bit length. A 2048-bit RSA modulus in decimal is 617 digits and tells you nothing.

Pages locked to one format

Full Binary Format Decoder tool

Explore Our Tools

Browse all tools