1. Home
  2. Developer tools
  3. ASN.1 Decoder

ASN.1 Decoder

Paste a certificate, key, signature request or any DER blob and see its structure as a tree, with every object identifier named.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use ASN.1 Decoder

  1. Paste PEM, Base64 or hex, or open a file.
  2. Read the structure tree.
  3. Copy or download the dump.

Features

  • Offsets, header and length for every element
  • About 100 object identifiers named
  • Expands OCTET STRING and BIT STRING contents that hold DER
  • Guesses the file type (certificate, key, request)
  • Times, strings and integers decoded
  • DER only, with clear errors for damaged input

Supported formats

Input

  • PEM text
  • DER files (.crt, .cer, .der)
  • Base64 or hex

You get

  • Structure tree
  • Text dump

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the ASN.1 Decoder is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It reads DER; BER with indefinite lengths is reported as an error.
  • About 100 common object identifiers are named; others are shown as dotted numbers.

Guide

Reading ASN.1 and DER structures in certificates and keys

Certificates, public keys, certificate requests, PKCS#12 files and many protocol messages are written in ASN.1, an abstract notation, and stored in DER, one strict binary encoding of it. DER is compact and unreadable by eye, which is why tools like openssl asn1parse exist. This decoder gives the same view in a browser tab: paste the data and read the structure as an indented tree, with offsets and named identifiers, without installing anything or uploading the file.

How DER is built

Every element has three parts. A tag says what kind of value follows: 0x30 is a SEQUENCE, 0x31 a SET, 0x02 an INTEGER, 0x06 an OBJECT IDENTIFIER, 0x0C a UTF8String, 0x03 a BIT STRING. A length follows, in one byte for values up to 127 and in several bytes after that. The value itself comes last, and for a SEQUENCE it is simply more elements. That recursive layout is why a dump looks like a tree.

A worked example

The Sample button loads a 313-byte certificate request. The page reports “Looks like PEM label CERTIFICATE REQUEST”, size 313 bytes and three top-level elements. The first line, 0: 4+309 SEQUENCE, wraps the whole request. Inside it the subject name is built from SET and SEQUENCE pairs: the object identifier 2.5.4.6 is shown as countryName (C) with the value “DE”, 2.5.4.10 as organizationName (O) with “Test GmbH”, and 2.5.4.3 as commonName (CN) with “api.example.org”. The public key follows: 1.2.840.10045.2.1 is id-ecPublicKey, 1.2.840.10045.3.1.7 the curve prime256v1 (P-256), and a 65-byte BIT STRING beginning 04 holds the uncompressed point. The requested extensions contain subjectAltName with two names, api.example.org and api2.example.org, and the signature algorithm 1.2.840.10045.4.3.2 is ecdsa-with-SHA256.

Reading object identifiers

An OID is a path of numbers assigned by standards bodies. 2.5.4.x entries are X.500 attributes such as names, 1.2.840.113549 is RSA Security’s arc (PKCS), and 1.2.840.10045 is the arc for elliptic-curve algorithms. About 100 common ones are built in; others print as dotted numbers, which you can look up in a registry.

Encapsulated content

Some values are containers: an OCTET STRING that holds a whole extension, or a BIT STRING that holds a signature made of two integers. When the content parses as valid DER, the page expands it and marks the line encapsulated. In the sample the signature BIT STRING opens into a SEQUENCE of two INTEGERs, the r and s values of the ECDSA signature.

Limits

The page reads DER. Files that use BER with indefinite lengths, common in older PKCS#7 or CMS data, are reported as errors; convert them with OpenSSL first. It describes structure only: it does not check that a certificate follows X.509 rules, does not verify signatures here, and does not decide what to trust. For those jobs, use the certificate and CSR decoders.

Practical uses

A dump answers questions that a certificate viewer hides. Is the key usage extension marked critical? Which curve does a key use? Does a signature contain the two integers you expect? Developers paste the output into bug reports, security reviewers compare the extensions of two certificates line by line, and people debugging a library that refuses a key can see at once whether the file is a certificate, a request, a private key or something else entirely, since the first elements differ for each type.

Checked against the current version of the ASN.1 Decoder on .

Frequently asked questions

What does 4+309 mean at the start of a line?

It is the size of the element: four bytes of header (tag and length) followed by 309 bytes of content. The number before the colon is the offset of the element from the start of the data.

Why do some elements show indented numbers that restart from 2?

Contents inside an encapsulated OCTET STRING or BIT STRING are a new DER stream, so their offsets are counted from the start of that inner stream rather than the whole file.

What is the difference between DER and PEM?

DER is the binary encoding. PEM is the same bytes written in Base64 between BEGIN and END lines so it can be pasted into text files and e-mails.

Why can’t it read my old PKCS#7 file?

Some older CMS and PKCS#7 files use BER with indefinite lengths. This tool reads DER only and says so; convert the file with OpenSSL first.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.