ISO 7816-4 File System Explorer

Interactive ISO 7816-4 smart card file system explorer. Build and visualize MF (Master File), DF (Dedicated File), and EF (Elementary File) hierarchies. Explore FCI data, simulate SELECT commands, and check access conditions. Essential for smart card application design and file structure planning.

File Tree

File Details

Click a file in the tree to see details

How to Use

Click any node to view its file control information. Add DFs (application directories) and EFs (data files) to build a card structure. The FCI data shows file size, type, access conditions, and lifecycle status — just like a real card's response to SELECT.

Related Tools

APDU Command Builder — Build SELECT/READ commands | EMV TLV Parser — Parse FCI template data | ISO 7816 Protocol Reference

ISO 7816 File System Structure

ISO/IEC 7816-4 defines a hierarchical file system for smart cards. Understanding this structure is fundamental for smart card application development, file management, and data access operations.

File Hierarchy

The file system has three levels: MF (Master File, ID 3F00) is the root directory, always present after card reset. DF (Dedicated File) is a subdirectory that can contain other DFs or EFs. ADF (Application Dedicated File) is a special DF associated with an AID, providing application isolation. EF (Elementary File) stores actual data records.

Elementary File Types

Transparent EF: stored as a contiguous byte array, accessed by READ BINARY / UPDATE BINARY with an offset. This is the simplest type, used for small data like serial numbers. Linear Fixed EF: stores records of equal length, accessed by READ RECORD / UPDATE RECORD with a record number. Used for fixed-size records like phone book entries. Linear Variable EF: records have varying lengths, each prefixed with a length byte. Cyclic EF: circular buffer of equal-length records, oldest entries overwritten first. Used for transaction logs where only recent entries matter.

File Selection

Files are selected using the SELECT command (INS=A4). Selection can be by file ID (2 bytes), by AID (for application DFs), or by path (sequence of file IDs from MF). The short file ID (SFI) method allows selecting an EF within the current DF using a 5-bit identifier in the command's P2 parameter, useful for READ RECORD operations. Access to files is controlled by security attributes defined in the file's FCP (File Control Parameters), which may require PIN verification or cryptographic authentication before read or write operations.

Explore a Real File System

The DF/EF structure the guide walks through exists on actual smart cards - a reader is the only way to see it.

ACR1252U Smart Card Reader ACR1252U Smart Card Reader (~$65) — Contact + contactless reader for SELECT by AID and reading EF contents on dual-interface cards.
Check Price on Amazon

Disclosure: As an Amazon Associate, CardWise earns from qualifying purchases at no additional cost to you. This does not affect our recommendations.