redzilla
All tools
Layer 2

VLAN Decoder

Paste the 16-bit TCI or the full 32-bit 802.1Q tag in hex to decode TPID, PCP, DEI and VLAN ID, or build the tag by choosing VID, priority and DEI. Includes the binary breakdown of the TCI. Nothing is sent to any server.

Mode

Accepts 0x… or just hex digits. 4 digits = TCI; 8 digits = tag (TPID+TCI).

Examples
redzilla.cl — vlan
 
TCI
Tag
VID
PCP · 802.1p priority
DEI
VLAN ID (VID)

Binary breakdown of the TCI (16 bits)

PCP (3 bits) DEI (1 bit) VID (12 bits)

802.1p priority table (PCP)
PCPAcronymTraffic class
802.1Q tag structure

Tag 4 bytes inserted after the source MAC: TPID (16 bits) + TCI (16 bits).

TPID 0x8100 = 802.1Q (C-Tag) · 0x88A8 = 802.1ad (S-Tag / QinQ) · 0x9100 = legacy / non-standard.

TCI PCP = (TCI >> 13) & 0x7 · DEI = (TCI >> 12) & 0x1 · VID = TCI & 0x0FFF.

Runs locally in your browser · no sign-up · nothing leaves your browser

How it works

The tool works with the IEEE 802.1Q tag, the 4 bytes inserted after the source MAC in an Ethernet frame: TPID (16 bits, 0x8100 for 802.1Q, 0x88A8 for 802.1ad/QinQ) plus the TCI (16 bits). In decode mode you paste the TCI in hex (4 digits) or the full tag (8 digits) and it extracts every field; in compose mode you pick the VLAN ID, priority and DEI and get the TCI and the tag ready to use, with the binary breakdown of the 16 bits.

The TCI is split with bit shifts: PCP = (TCI >> 13) & 0x7 (the 3 high bits, the 802.1p priority from 0 to 7), DEI = (TCI >> 12) & 0x1 (the drop-eligible bit, formerly called CFI) and VID = TCI & 0x0FFF (the 12 low bits, the VLAN number from 0 to 4095). The tool flags the special VIDs: 0 is priority-tagged, 1 is the default VLAN and 4095 is reserved.

Example: decoding TCI 0x2064

  1. In binary, 0x2064 = 0010 0000 0110 0100.
  2. PCP (3 high bits): 001 = 1 → Background (BK) class, the lowest priority.
  3. DEI (bit 12): 0 → frame not drop-eligible.
  4. VID (12 low bits): 0000 0110 0100 = 0x064 = VLAN 100, a usable VID.

Frequently asked questions

How many VLANs can be created and which VIDs are reserved?
The VID field has 12 bits, meaning 4096 values, but only 4094 are usable: 0 does not identify a VLAN (it is used in priority-tagged frames, which carry priority only) and 4095 is reserved by the standard. VID 1 is the default VLAN on most switches, and for security it is recommended not to use it for user traffic.
What is the PCP and why is the priority order not linear?
PCP (Priority Code Point) is the 3-bit 802.1p priority, from 0 to 7. The quirk is that 1 (Background) is the lowest-priority class, below 0 (Best Effort): the real order is 1 < 0 < 2 < 3 < 4 < 5 < 6 < 7. Voice is usually marked with PCP 5 and video with PCP 4, while 6 and 7 are reserved for network control.
What is the difference between TPID 0x8100 and 0x88A8?
0x8100 identifies a regular 802.1Q tag (the customer C-Tag). 0x88A8 corresponds to 802.1ad, the outer S-Tag of the Q-in-Q double tagging that providers use to carry customer VLANs inside a service VLAN. There is also 0x9100 as a legacy non-standard TPID. The tool recognizes and labels all three.
What does the DEI bit in the VLAN tag mean?
DEI (Drop Eligible Indicator) marks whether the frame may be dropped first under congestion: with DEI=1 the switch treats it as expendable compared with DEI=0 traffic. In the original 802.1Q that bit was called CFI and served Token Ring compatibility; the current meaning comes from 802.1ad. In campus networks it is almost always 0.
Was this tool useful?
Disclaimer We take great care to keep every tool accurate and review it thoroughly; even so, we can't guarantee it is free of errors or take responsibility for how the results are used. We recommend double-checking anything critical.
Found an error? Let us know →