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 encoding scheme used to store NDEF messages in NFC tag 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 Message | Contains an NDEF message |
| 0xFD | Proprietary | Manufacturer-specific data |
| 0xFE | Terminator | End of TLV data area |
NDEF Message TLV Example
A URI record 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 Content
NFC Troubleshooting Guide
Getting Started…the factory contains no capability-container and no NDEF TLV. Use your NFC SDK's formatNdef() method before writing.…
ESP32 NFC Development
Programming…memory starts at page 4 // Each page is 4 bytes // NDEF TLV 0x03 + length byte + NDEF record + 0xFE terminator void…
NDEF Specification Deep Dive
Advanced…the parser how to interpret the TYPE field that follows. TLV Blocks on Tag Memory NDEF messages are not written raw to…
NFC Standards Reference Guide
Advanced…Coverage NDEF Technical Specification 1.0 Message, record, TLV format Tag Type 2 Platform (T2T) 1.0 NTAG, Ultralight —…
Building an NFC-Based Product
Advanced…a 100-character HTTPS URL needs ~130 bytes including TLV and record headers — well within NTAG213's 144-byte…
NFC Tag Not Detected: Diagnosis Guide
Troubleshooting…if its capability-container is corrupt or the NDEF tlv is malformed. Common NDEF faults: Fault Symptom on…
NFC Write Failures and Recovery
Troubleshooting…the affected 4-byte block. If that block is the NDEF TLV length field, the entire message becomes unparseable.…
NFC Testing Methodology
Troubleshooting…container bytes E1 10 xx 00 for Type 2 READ NDEF blocks TLV stream starts 0x03 0x00 = blank; 0xFF = corrupt WRITE +…
Frequently Asked Questions
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.