Productivity and Utilities

ASN.1 DER Structure Viewer

Paste a PEM block, base64 text or hex bytes to walk through the structure element by element.

Your numbers

A PEM block, base64 or hex. Public data only: private keys are refused.

Shows the structure of DER that is wrapped in those strings, such as certificate extensions.

Result

Elements found

5

91 bytes read, 1 top level element.

Bytes read
91
Deepest level
2
Writes back to the same bytes
Yes

Each element

OffsetElementHeader + lengthValue
0SEQUENCE (constructed)2 + 892 elements
2› SEQUENCE (constructed)2 + 192 elements
4› › OBJECT IDENTIFIER2 + 71.2.840.10045.2.1 (Elliptic curve key)
13› › OBJECT IDENTIFIER2 + 81.2.840.10045.3.1.7 (P-256)
23› BIT STRING2 + 660 unused bits, 046596e8c575eb0349d8a2fd2162d7b9ca02ed6c158c0a1c... (65 bytes)
How this was calculated
  1. Every element is a tag byte (class, constructed flag and type), a length, and that many bytes of content.
  2. A length under 128 is one byte. Longer lengths start with 0x80 plus the number of length bytes that follow.
  3. Constructed elements such as SEQUENCE and SET hold other elements. The table walks them in order and shows the depth, the offset of the tag byte and the sizes of header and content.
  4. Primitive values are decoded when the type is known: integers, object identifiers (with a name when the page knows one), strings, times and flags.
  • Only DER with definite lengths is read. This page decodes the structure, it does not check signatures or trust. Data stays in this browser.

Calculated using SumPanda.com · https://sumpanda.com/asn1-der-structure-viewer/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the asn.1 der structure viewer

  1. Paste a PEM block (with its BEGIN and END lines), base64 text, or hex bytes into the box. Leave the format on Detect, or choose it yourself.
  2. Tick Look inside OCTET STRING and BIT STRING if you want the page to open data that is wrapped in those strings, such as certificate extensions.
  3. Read the table from top to bottom: each row is one element with its offset, depth, header size, content length, type and decoded value.
  4. Copy the table, or download the CSV, to keep a record of the structure.

Formula

element = tag byte(s) + length + content

tag byte: class (2 bits), constructed flag (1 bit), type number (5 bits, or more bytes when 31)

length: under 128 is one byte; otherwise 0x80 + number of length bytes, then the length

DER is a strict form of ASN.1 encoding. Constructed elements such as SEQUENCE and SET contain other elements, which is why the result is a tree. The page checks that writing the tree back gives the same bytes.

An elliptic curve public key

The built in sample is a 91 byte public key. The outer SEQUENCE starts at offset 0 with a 2 byte header and 89 bytes of content. Inside it, a second SEQUENCE of 19 bytes holds two object identifiers: 1.2.840.10045.2.1, shown as Elliptic curve key, and 1.2.840.10045.3.1.7, shown as P-256.

A BIT STRING of 66 bytes follows at offset 23. Its first byte says 0 bits are unused, and the other 65 bytes are the public point. The offsets, header sizes and lengths agree with what the openssl asn1parse command prints for the same bytes.

Reading the columns

Offset is the position of the element’s first byte, counting from 0. Depth is how many elements enclose it, and the arrows in the Element column show the nesting. Header is the number of tag and length bytes, and Length is the number of content bytes, so an element takes Header plus Length bytes in total.

Values are decoded when the type is known: integers as numbers, object identifiers with a name when the page recognizes them, strings as text, times as written, and other bytes as hex. Long values are cut and show how many bytes they hold.

Where DER shows up

Certificates, public keys, signing requests and many other security files are DER inside PEM armor. Looking at the raw tree helps when a tool rejects a file and you want to see which field is wrong, or when you need an object identifier in a form you can search for.

For the subject, issuer and dates of a certificate in plain language use the PEM Certificate Decoder, and to inspect the bytes of any file see the Hex Viewer for Files.

Assumptions and limits

  • Only DER with definite lengths is read. Indefinite lengths from BER are refused with a message.
  • Input is limited to about 64 KB and 1,500 elements, and nesting to 40 levels.
  • Private key blocks are refused on purpose. Paste public data or certificates only.
  • The page decodes structure and does not check signatures, dates or trust.
  • Nothing typed here leaves your browser.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What is the difference between PEM and DER?

DER is the binary encoding. PEM is the same bytes written as base64 between BEGIN and END lines, so that it can be pasted into text. The page strips the armor and reads the bytes inside.

Why does the page refuse my file?

The usual causes are an indefinite length, which DER does not allow, a length that runs past the end of the data, or text that is not base64 or hex. The message names the offset where reading stopped.

What does Look inside do?

Some elements are strings that hold more DER. With the box ticked, the page tries to read their content as one element and shows it as a child when it fits exactly. Content that is not valid DER stays as plain bytes.

Does a successful read mean the data is valid?

It means the bytes form well-formed elements. A certificate or key can be well-formed and still be expired, untrusted or the wrong type for what you need.