TLV (Type-Length-Value)
The encoding scheme used to store NDEF messages and other data structures in NFC tag memory. Each data block is preceded by a type byte and length byte(s). The NDEF message TLV type is 0x03.
What Is TLV?
TLV (Type-Length-Value) is the binary encodingencodingData writing to NFC tags during manufacturing productionView full → scheme used to store NDEF messages in NFC tagNFC tagPassive unpowered device storing data, powered by reader's RF fieldView full → user memory. TLV provides a container format allowing readers to locate and parse NDEF data without prior knowledge of the exact memory layout.
TLV Block Structure
[Type: 1 byte] [Length: 1 or 3 bytes] [Value: L bytes]
- Type: Identifies the data kind.
- Length: For 0-254 bytes, encoded as 1 byte. For 255-65534 bytes, encoded as 3 bytes (0xFF + 2-byte big-endian).
- Value: The actual data payload.
Standard TLV Types
| Type | Name | Description |
|---|---|---|
| 0x00 | NULL | Padding — reader skips |
| 0x01 | Lock Control | Describes lock bit positions |
| 0x02 | Memory Control | Identifies reserved memory areas |
| 0x03 | NDEF MessageNDEF MessageComplete data unit containing one or more NDEF recordsView full → | Contains an NDEF message |
| 0xFD | Proprietary | Manufacturer-specific data |
| 0xFE | Terminator | End of TLV data area |
NDEF Message TLV Example
A URI recordURI recordNDEF record encoding URIs with compact prefix compressionView full → for "https://example.com" (18 bytes):
03 12 D1 01 0E 55 04 65 78 61 6D 70 6C 65 2E 63 6F 6D FE
| | |---------- NDEF message (18 bytes) ---------| |
| Length=18 Terminator
Type=NDEF
Parsing Algorithm
- Read Type byte. If 0x00 (NULL): advance one byte, repeat. If 0xFE (Terminator): stop.
- Read Length field (1 or 3 bytes). If Type = 0x03, the Value bytes are the NDEF message.
- Continue at next byte after Value.
Three-Byte Length
For NDEF messages longer than 254 bytes (e.g., on NTAG 216 or DESFire):
03 FF 01 F4 [500 bytes of NDEF data] FE
0xFF signals two-byte length follows (0x01F4 = 500).
Relationship to NDEF
TLV and NDEF are complementary layers. NDEF defines message and record format (how to encode URLs, text, etc.). TLV defines how those bytes are physically stored in tag memory. A properly formatted NFC tag always uses TLV to wrap its NDEF content.
Related Terms
Related Guides
常见问题
The NFC glossary is a comprehensive reference of technical terms, acronyms, and concepts used in Near Field Communication technology. It is designed for developers, product managers, and engineers who work with NFC and need clear definitions of terms like NDEF, APDU, anti-collision, and ISO 14443.
Each glossary term is cross-referenced with related NFC chips, standards, and other terms. For example, the term 'AES-128' links to chips that support AES encryption (NTAG 424 DNA, DESFire EV2/EV3), and the term 'ISO 14443' links to all chips compliant with that standard.
Yes. NFCFYI provides glossary definitions in 15 languages including English, Korean, Japanese, Chinese, Spanish, Portuguese, Hindi, Arabic, French, Russian, German, Turkish, Vietnamese, Indonesian, and Thai. Use the language selector in the header to switch languages.