APDU Commands Reference & Status Word Lookup

Complete ISO 7816-4 APDU status word reference. Search any SW1 SW2 code — from the ubiquitous 9000 (success) to the dreaded 6A82 (file not found). Every smart card developer's daily debugging companion.

SW1 SW2TypeMeaningDebugging Notes
90 00SuccessCommand completed successfully. Normal ending.The only response you want to see. No further action needed.
61 XXData ReadyCommand processed; XX bytes of response data available. SW2 = available byte count.T=0 only. Issue GET RESPONSE (INS=C0) with Le set to SW2 value to retrieve data. T=1 does not return this — data is included directly.
62 00WarningWarning: no information given. Non-volatile memory state changed.Command executed but EEPROM/Flash state was altered. Check persistent data.
62 82WarningEnd of file reached before reading Le bytes.Reduce the offset or Le parameter. Check actual file size.
62 83WarningSelected file is deactivated.Reactivate the file or select a different one.
63 00WarningVerification failed. PIN or password incorrect.Prompt user to re-enter PIN.
63 CXWarningVerification failed. X retries remaining. X=0 means locked.Tell user remaining attempts. If X=0, use RESET RETRY COUNTER (PUK unlock).
65 81ErrorMemory failure. EEPROM/Flash write operation failed.Card memory may be worn out. Try another card or memory location.
67 00ErrorWrong length. Lc or Le field incorrect.Verify the Lc byte matches the actual length of the Data field. Check CLA encoding of extended Lc/Le.
68 00ErrorCLA not supported. Logical channel not available.Check the CLA byte. Try without logical channel bits (CLA=00 or 04).
68 81ErrorLogical channel not supported.Card does not support MANAGE CHANNEL. Use only channel 0.
68 82ErrorSecure messaging not supported.SM bit in CLA is set but card doesn't support it. Clear SM bits (0x0C) in CLA.
69 00ErrorCommand not allowed.Current card state prohibits this command.
69 81ErrorCommand incompatible with file structure.You used READ BINARY on a record file, or READ RECORD on a transparent file. Use the correct read command.
69 82ErrorSecurity status not satisfied.PIN not verified or authentication not performed. Execute VERIFY or EXTERNAL AUTHENTICATE first.
69 83ErrorAuthentication method blocked.PIN or key is locked. Use PUK or administrative key to unlock.
69 84ErrorReferenced data (key/PIN) invalid.The key reference or PIN ID does not exist on this card.
69 85ErrorConditions of use not satisfied.Time window, count limit, or amount limit not met.
69 86ErrorCommand not allowed — no current EF.You must SELECT a file before reading or writing.
6A 80ErrorIncorrect parameters in data field.Command data contains invalid values.
6A 81ErrorFunction not supported.Card does not implement this INS code or this specific operation.
6A 82ErrorFile not found. The specified FID or AID does not exist.The #1 debugging headache. Double-check the file ID or AID. Try listing available applications first.
6A 83ErrorRecord not found. Record number out of range.Check the P1 record number in READ/WRITE RECORD. Verify with the AFL records list.
6A 84ErrorNot enough memory space.File is full. Delete unnecessary data or use a card with more memory.
6A 88ErrorReferenced data (key/certificate) not found.Security environment references a key or certificate that doesn't exist.
6B 00ErrorOffset outside EF range. P1/P2 parameters incorrect.The READ/WRITE BINARY offset is past the end of the file. Reduce the offset.
6C XXLe HintWrong Le; correct Le = XX. SW2 tells you the right value.Re-issue the command with Le set to SW2. Common with SELECT when FCI is larger than expected.
6D 00ErrorInstruction code (INS) not supported.The card doesn't recognize this INS byte. Check the command specification.
6E 00ErrorClass (CLA) not supported.The CLA byte is rejected. Check logical channel and SM bits.
6F 00ErrorInternal exception / checking error. Unknown card internal error.Card may be in an inconsistent state. Try a cold reset. If persistent, card may be damaged.

APDU Command Structure Overview

# C-APDU (Command APDU)
CLA INS P1 P2 [Lc] [Data] [Le]

# R-APDU (Response APDU)
[Response Data] SW1 SW2

# Common INS Codes
A4 = SELECT           B0 = READ BINARY       D6 = UPDATE BINARY
B2 = READ RECORD      E2 = APPEND RECORD     20 = VERIFY
82 = EXTERNAL AUTH    88 = INTERNAL AUTH      84 = GET CHALLENGE
A8 = GET PROCESSING OPTIONS (EMV)            AE = GENERATE AC (EMV)
Related: For protocol-level theory, read our ISO 7816 Complete Guide. For payment-specific APDUs, see the EMV Tag Reference.