Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1982
Smart-card

ISO 7816-4 CLA Decoder

Decode the ISO/IEC 7816-4 CLA (class) byte: interindustry vs proprietary classification, secure-messaging bits, command-chaining indicator, and logical-channel number.

How to use this tool

What it does

Decodes an ISO 7816-4 CLA byte — logical channel, secure-messaging indication and chaining bits.

When to use it

Use it when a command's class byte carries more than the base value and you need each bit's meaning.

Worked example

Decode 0x0C to see secure messaging with a header included.

Input

Decoded

Enter a CLA byte.
All decoding runs locally.

About CLA

The CLA byte sits at the start of every APDU (CLA INS P1 P2 [Lc] [data] [Le]). Its bit-fields tell the card whether the command is interindustry or proprietary, whether secure messaging is wrapping the body, whether command chaining is in progress, and which logical channel the command targets.

Spec

ISO/IEC 7816-4 §5.4.1.

Frequently asked questions

What does the CLA byte encode?

Whether the command is interindustry or proprietary, whether secure messaging applies and in which form, whether the command is chained, and which logical channel it targets.

How do I tell interindustry from proprietary?

The high nibble. 0x0X, 0x1X and similar are interindustry as defined by ISO 7816-4; 0x8X and 0xAX are proprietary, which is why vendor documentation is required to interpret them.

Which bits carry secure messaging?

Bits 3 and 4 of the interindustry CLA. They distinguish no secure messaging, proprietary secure messaging, and the standard form with or without the header being authenticated.

What is command chaining?

Bit 5 set means more command data follows in the next APDU. It is how a payload larger than a single APDU is delivered when extended length is unavailable.

Does anything I paste leave my browser?

Nothing. The tool is entirely client-side: the page ships a static script, does no network calls, and never transmits what you paste. You can confirm it by opening the network tab, or by loading the page and then going offline.