Skip to content
QKQuickKit日本語
Routing & BGPLOCALRuns in your browser

MPLS Label Decoder

Decode or build a 32-bit MPLS label stack entry: 20-bit label, Traffic Class (TC/EXP), bottom-of-stack bit, and TTL, with reserved-label names.

This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.

Fields

Decoded or encoded MPLS label stack entry
Label (decimal)
Label (hex)
Reserved label
Traffic Class (TC)
S — bottom of stack
TTL
Entry (hex)
Entry (decimal)
Entry (binary: label / TC / S / TTL)
How it works

An MPLS label stack entry (RFC 3032) is 32 bits: a 20-bit label, a 3-bit Traffic Class field (the TC field — RFC 5462 renamed it from EXP), the 1-bit S (bottom-of-stack) flag, and an 8-bit TTL. Decode: choose the input radix (hexadecimal or decimal) and paste the 32-bit entry — a bare value such as 12345678 is valid as both, so the radix is stated rather than guessed. Hex input may carry a leading 0x and internal spaces or underscores. Encode: enter the label (0–1048575), TC (0–7), the S bit, and TTL to build the word. Label values 0–15 are special-purpose and are named from the IANA Special-Purpose MPLS Label Values registry (0 IPv4 Explicit NULL, 1 Router Alert, 2 IPv6 Explicit NULL, 3 Implicit NULL, 4 MPLS Network Actions, 7 Entropy Label Indicator, 13 GAL, 14 OAM Alert, 15 Extension Label; 5–6 and 8–12 are unassigned). Labels 16 and above are usable, though a platform may reserve some of the low range for its own use. This decodes one entry only; it does not walk a stack or the payload after it.