Type–length–value

Within communication protocols, TLV (type-length-value or tag-length-value) is an encoding scheme used for informational elements.

These fields are used as follows: Some advantages of using a TLV representation data system solution are: Imagine a message to make a telephone call.

In a first version of a system this might use two message elements: a "command" and a "phoneNumberToCall": Here command_c, makeCall_c and phoneNumberToCall_c are integer constants and 4 and 8 are the lengths of the "value" fields, respectively.

Some application layer protocols, including HTTP/1.1 (and its non-standardized predecessors), FTP, SMTP, POP3, and SIP, use text-based "Field: Value" pairs formatted according to RFC 2822.

ASN.1 specifies several TLV-based encoding rules (BER, DER), as well as non-TLV based ones (PER, XER).