APDU Status Word Lookup
What 9000, 6A82, 6985 and the rest of SW1SW2 actually mean.
Runs entirely in your browser. Nothing you paste is uploaded, logged or stored.
ISO 7816-4 status words
| Code | Meaning |
|---|---|
| Success | |
| 9000 | SuccessokNormal processing completed. No further qualification. |
| 61XX | More data availableokXX more bytes are waiting. Issue GET RESPONSE with Le = XX. |
| Warning | |
| 62XX | Warning — state unchangedwarnProcessing completed with a warning; the card state did not change. |
| 6281 | Returned data may be corruptedwarn |
| 6282 | End of file or record reached earlywarnFewer bytes were available than requested. |
| 6283 | Selected file is deactivatedwarnHistorically "invalidated". The application is blocked. |
| 6284 | File control information badly formattedwarn |
| 6285 | Selected file is in termination statewarn |
| 63XX | Warning — state changedwarn |
| 6300 | Authentication failedbadVerification failed with no counter information. |
| 6381 | File filled up by the last writewarn |
| 63CX | Verification failed — X tries remainingbadThe low nibble is the remaining PIN attempt count. 63C0 means the PIN is now blocked. |
| Execution error | |
| 6400 | Execution error — state unchangedbad |
| 6401 | Immediate response required by the cardwarn |
| 6500 | Memory failure — state changedbad |
| 6581 | Memory failurebad |
| 6600 | Security-related issuebad |
| Checking error | |
| 6700 | Wrong lengthbadLc or Le is wrong for this command. Usually a terminal-side bug. |
| 6800 | Functions in CLA not supportedbad |
| 6881 | Logical channel not supportedbad |
| 6882 | Secure messaging not supportedbad |
| 6883 | Last command of the chain expectedbad |
| 6884 | Command chaining not supportedbad |
| 6900 | Command not allowedbad |
| 6981 | Command incompatible with file structurebad |
| 6982 | Security status not satisfiedbadA required authentication step has not been performed. |
| 6983 | Authentication method blockedbadPIN blocked. The try counter has reached zero. |
| 6984 | Reference data not usablebadOften means the PIN reference data is invalidated. |
| 6985 | Conditions of use not satisfiedbadThe commonest EMV failure after 6A82. The card will not do this now — usually the command arrived out of sequence, or a prerequisite (GPO, PIN, prior AC) is missing. |
| 6986 | Command not allowed — no current EFbadYou need to SELECT a file first. |
| 6987 | Expected secure messaging objects missingbad |
| 6988 | Incorrect secure messaging data objectsbad |
| 6A00 | Wrong parameters P1-P2bad |
| 6A80 | Incorrect parameters in the command data fieldbad |
| 6A81 | Function not supportedbad |
| 6A82 | File or application not foundwarnThe AID you selected is not on this card. Very common when a terminal tries an AID list in order — a 6A82 here is normal, not an error. |
| 6A83 | Record not foundbadA READ RECORD asked for a record outside the AFL. |
| 6A84 | Not enough memory space in the filebad |
| 6A85 | Lc inconsistent with the TLV structurebad |
| 6A86 | Incorrect parameters P1-P2bad |
| 6A87 | Lc inconsistent with P1-P2bad |
| 6A88 | Referenced data not foundbadA GET DATA asked for a tag the card does not hold. |
| 6A89 | File already existsbad |
| 6A8A | DF name already existsbad |
| 6B00 | Wrong parameters — offset outside the EFbad |
| 6CXX | Wrong Le — XX is the correct lengthwarnRe-issue the command with Le = XX. |
| 6D00 | Instruction code not supported or invalidbadThe card does not implement this INS byte. |
| 6E00 | Class not supportedbadThe card does not implement this CLA byte. |
| 6F00 | No precise diagnosisbadThe card failed but will not say why. Often a genuine card fault or an unhandled internal exception. |
How to read SW1SW2
Every APDU response ends with two status bytes. 9000 is plain success. Anything
starting 61 or 62-63 is a warning — the command worked, with
caveats. Anything starting 64-6F is an error, and the second byte
qualifies it.
Some codes carry data in the low byte. 61XX means XX more bytes are waiting for a
GET RESPONSE. 6CXX means your Le was wrong and XX is the correct length. And
63CX is the one worth memorising: the low nibble is the number of PIN attempts
remaining, so 63C2 means two tries left and 63C0 means the PIN is now
blocked.
The two you will actually see
6A82 — file or application not found. Usually not an error at all. Terminals work through a candidate AID list and a 6A82 simply means "this card does not have that application". Seeing several before a 9000 is completely normal.
6985 — conditions of use not satisfied. The card will not do this right now. Nearly always a sequencing problem: GET PROCESSING OPTIONS before SELECT, a second GENERATE AC without a first, READ RECORD outside the AFL, or a PIN verification that was required and skipped. When you get a 6985, look at the command that came before it.
Codes that mean "your terminal is wrong"
6700 (wrong length), 6A86 (incorrect P1-P2), 6D00
(unsupported instruction) and 6E00 (unsupported class) all point at the command you
constructed rather than the card. 6F00 — no precise diagnosis — is the card giving up
without explanation, and usually indicates a genuine card fault or an unhandled exception in the
applet.
More EMV chip tools
TLV parser
Paste BER-TLV hex and get a decoded tag tree with EMV names, formats and nested templates.
Bit fields
Decode TVR, TSI, AIP, AUC, CID, CVM Results, Terminal Capabilities and the contactless qualifiers.
IAC vs TVR
Compare a TVR against the Issuer Action Codes to see exactly which bit forced the decline or the go-online.
CVM list
Break tag 8E into its X and Y amounts and the cardholder verification rules, in priority order.
AID lookup
Application identifiers to scheme and product — A0000000031010 and friends.
EMVCo QR
Decode a merchant-presented QR payload and verify its CRC.