EMV TLV decoder

Paste EMV chip-card data in hex and read it as a tree of tags, with the EMV name of each tag and what the bits of TVR, TSI, AIP, CID and CVM results

loading EMV TLV decoder
About this tool

What is an EMV TLV decoder?

Chip-card payments run on EMV, the specification maintained by EMVCo. Almost everything a card and a terminal say to each other travels as BER-TLV: a sequence of data objects, each made of a tag (what it is), a length (how many bytes) and a value. Some objects are templates that hold other objects, so a card answer is really a small tree. The raw form is a run of hex such as 9F 27 01 80 9F 26 08 …, which nobody reads comfortably.

This decoder turns that hex into the tree. For each object it shows the tag, the EMV name (for example 9F26 is the Application Cryptogram), the length, the value in hex and, when the bytes are printable, as text. For the objects whose layout the EMV books define, it goes one step further and explains the value: the bits of the Application Interchange Profile (AIP), the Terminal Verification Results (TVR), the Transaction Status Information (TSI), the Terminal Capabilities, the Cryptogram Information Data (CID), the CVM list and CVM results, the application file locator, the data object lists, dates, currencies and card numbers.

It is meant for developers and testers who read terminal logs, APDU traces and certification reports. It runs in your browser, sends nothing, and accepts hex with spaces, line breaks or 0x prefixes.

Use test data only. Do not paste real card numbers, PINs or keys. The tool does not send them anywhere, but a real card number does not belong in any web page.

How to decode a TLV string

  1. Paste the hex into the box, or pick one of the four examples (a SELECT response, a record, a GENERATE AC answer and a set of terminal data).
  2. Read the tree. Templates such as 6F, A5, 70, 77 and BF0C contain their children, indented below them.
  3. Open the value of any tag you care about. Objects with a defined layout show a table of what each bit means. By default only the bits that are set are listed; use "Show all bits" to see the clear ones too.
  4. Use the copy buttons for a single value, or "Copy as text" for the whole tree.
  5. If the data is broken, the message tells you the byte offset and what is wrong: a length that runs past the end, a cut tag or a character that is not hex.

A response from a card usually ends with a status word, such as 90 00. When the data parses without it, the tool takes it off and says so.

Examples

The cryptogram of a GENERATE AC answer

77 22 9F 27 01 80 9F 36 02 00 17 9F 26 08 A1 B2 … 82 02 39 00

Tag 9F27 with the value 80 is the Cryptogram Information Data. The first two bits mean ARQC, a request to authorise the transaction online. 9F36 is the transaction counter (23 here), 9F26 the 8-byte cryptogram and 82 the AIP.

Reading the AIP

39 00 has the bits for DDA, cardholder verification, terminal risk management and CDA set. The tool lists exactly those four, instead of leaving you to convert hex to binary and look up the table.

A TVR with one bit set

95 05 00 00 00 80 00

The fourth byte has bit 8 set: "Transaction exceeds floor limit". The other four bytes are zero, so nothing else went wrong.

Terminal capabilities and CVM results

9F33 with E0 F8 C8 is a typical chip terminal: manual entry, magnetic stripe and chip, plaintext and enciphered PIN, signature and no CVM, plus SDA, DDA and CDA. 9F34 with 42 03 02 says the enciphered PIN was verified online, under the condition "if terminal supports the CVM", and the result was successful.

TagNameTypical use
9F26Application CryptogramARQC, TC or AAC
9F27Cryptogram Information DataWhich cryptogram it is
95TVRTerminal checks that failed
9BTSISteps that were performed
82AIPWhat the card supports

Common mistakes

  • Pasting the whole APDU. The command header (00 A4 04 00 …) is not TLV. Paste only the data field of the response.
  • An odd number of hex digits. Each byte takes two digits; one missing digit shifts everything after it.
  • Cutting the data. A length that says 8 bytes with 5 left is reported as truncated, with the tag and the offset.
  • Expecting every tag to have a name. Card schemes and issuers use private tags. They appear as unknown, and the value is still shown.
  • Trusting a bit explanation outside its tag. The meaning of a bit belongs to the tag. The same byte in a different tag means something else.
  • Using real card data. Use sample or lab data.

Frequently asked questions

Is it safe to paste card data here?

Nothing is sent: the decoding happens in your browser. Even so, paste only test data. A real card number, PIN or key should not be pasted into any tool.

Does it verify the cryptogram?

No. Checking an ARQC needs the issuer's secret keys and the full transaction data. The tool shows what the cryptogram is, not whether it is correct.

Why does a bit show "no meaning defined"?

Because EMV Book 3 does not define that bit, or it is reserved. The tool lists it as set instead of inventing an explanation. Some kernels use those bits in their own way.

Which names and tables does it use?

EMV 4.3 Book 3, in English as in the specification. It covers about 125 common tags. Private tags of a card scheme or an issuer are shown as unknown.

How do I convert the hex or the values?

For bytes to text and back use the hex to text converter, and for numbers in several bases the base converter.

Report a problem