BER-TLV parser with EMV tags
Walk a BER-TLV byte stream into a clickable tree, with EMV tag lookup. Handles single-byte and multi-byte tags; short-form and long-form lengths; arbitrary nesting depth. Indefinite-length BER is intentionally not supported (very rare in card / EMV contexts).
Input — BER-TLV bytes
Tree
What is BER-TLV, in one line?
BER-TLV (Basic Encoding Rules — Tag, Length, Value) is the encoding the smart-card and EMV worlds use everywhere: SELECT response FCIs, application data, CDOL/PDOL, transaction logs. The tag tells you what the field is, the length tells you how big the value is, and the value is either primitive bytes or another nested TLV stream. This parser handles arbitrary depth and shows EMV-known tags by name.
Spec
ISO/IEC 8825-1 (X.690 BER) and EMV Book 3 (Annex B / Annex C).
Tag dictionary
Built-in EMV tag names — AID, AIP, AFL, ATC, CDOL/PDOL, AC, IPK and more. Add suggestions via contact.
Related tools
Parsing BER-TLV (EMV / ISO 7816)
BER-TLV (tag-length-value) is how payment and smart-card data is structured: EMV chip transactions, ISO 7816-4 file contents and many personalisation payloads are all nested TLV objects. This parser walks the structure, decodes each tag's length, and shows the nesting of constructed tags so you can find the data object you care about.
Worked example: 6F is the EMV File Control Information template — a constructed tag whose value contains further TLV objects such as 84 (DF Name) and A5 (FCI proprietary template). Use it to debug a card-reader trace or an EMV response. Tag names come from the common EMV/7816 dictionary; unknown proprietary tags are shown by their hex tag.
Frequently asked questions
What makes a tag 'constructed'?
Bit 6 of the first tag byte. A constructed tag (e.g. 0x6F, 0xA5) contains nested TLV objects; a primitive tag holds a raw value. The parser recurses into constructed tags.
Why is a tag shown as hex with no name?
It is a proprietary or less-common tag not in the built-in EMV/7816 dictionary. The structure is still decoded correctly; only the friendly label is missing.
Does my data leave the browser?
No. Parsing is entirely client-side.
How are multi-byte tags encoded?
When the low five bits of the first tag byte are all set, the tag continues into further bytes, each signalling continuation in its top bit. This is why some EMV tags are two bytes, such as 9F 02.
How does long-form length encoding work?
A length byte above 0x7F does not hold the length itself: its low seven bits give the number of following bytes that do. So 0x81 means one more length byte, and 0x82 means two.