802.1Q Ethernet VLAN Utility

VLAN Tag Decoder

Use this VLAN Tag Decoder to decode an IEEE 802.1Q VLAN Tag Control Information field or a complete four-byte VLAN tag. Inspect TPID, Priority Code Point, DEI, VLAN ID, hexadecimal value, decimal value and the exact 16-bit TCI layout.

✓ VLAN ID ✓ PCP Priority ✓ DEI / CFI ✓ 0x8100 TPID ✓ 16-Bit TCI
VLAN
Decode 802.1Q VLAN Tag
● Ready
Choose whether the input contains only the Tag Control Information field or the complete four-byte 802.1Q tag.
Used mainly with 16-bit numeric TCI input.
For TCI mode enter two bytes such as 00 64. For complete tag mode enter four bytes such as 81 00 00 64.
802.1Q TCI layout: the 16-bit Tag Control Information field contains 3 PCP bits, 1 DEI bit and 12 VLAN ID bits. VLAN IDs 1–4094 are normally usable; VID 0 represents priority-tagged traffic and VID 4095 is reserved.
VLAN Tag Decode Result Decoded
Decoded VLAN Tag
VLAN ID
PCP
DEI
TCI Hex
TCI Decimal
TCI Binary
TPID
VID Status
16-Bit TCI Layout
PCP — 3 bits
DEI
VLAN ID — 12 bits ————
Field Bits Binary Decimal Hex Meaning
Bit-Level Calculation Breakdown -
Normalized VLAN Tag
-

What Is a VLAN Tag Decoder?

A VLAN Tag Decoder interprets the VLAN information inserted into an Ethernet frame by IEEE 802.1Q tagging. A standard 802.1Q tag contains a Tag Protocol Identifier followed by a 16-bit Tag Control Information field.

The TCI field is divided into PCP, DEI and VLAN ID. This calculator extracts those bit fields directly instead of treating the two-byte value as a single undifferentiated number.

802.1Q VLAN Tag Structure

802.1Q Tag — 4 Bytes TPID TCI 16 bits 16 bits TCI: PCP | DEI | VLAN ID 3 1 12 bits

For the commonly encountered customer VLAN tag, TPID is 0x8100.

What Is the VLAN TCI Field?

TCI stands for Tag Control Information. It is the second 16-bit word in a standard VLAN tag.

Bits 15..13 = PCP Bit 12 = DEI Bits 11..0 = VLAN ID

The numerical TCI value can therefore be decoded with bit shifts and masks.

VLAN ID Bit Mask

The VLAN Identifier occupies the lowest 12 bits of TCI.

VLAN ID = TCI & 0x0FFF

Because 12 bits are available, the numerical field ranges from 0 through 4095. Not every value is available as an ordinary VLAN ID.

PCP Priority Code Point

PCP occupies the highest three bits of TCI and therefore has values from 0 through 7.

PCP = (TCI >> 13) & 0x07

PCP provides Layer-2 traffic priority information and is associated with IEEE 802.1p priority handling.

PCP Values 0 Through 7

PCP Binary General Priority Level
0000Best effort / default
1001Background
2010Excellent effort
3011Critical applications
4100Video-type controlled load
5101Voice-type latency-sensitive traffic
6110Internetwork control
7111Network control

Actual queue mappings and traffic treatment are configured by the network equipment and should not be inferred solely from the PCP number.

What Is DEI?

DEI stands for Drop Eligible Indicator. It occupies bit 12 of the TCI field.

DEI = (TCI >> 12) & 1

A DEI value of 1 can identify traffic that may be preferentially discarded during congestion, depending on network policy.

DEI vs CFI

Older VLAN documentation may refer to the same TCI bit as CFI, or Canonical Format Indicator. In modern Ethernet VLAN use it is known as DEI.

When decoding older packet captures or hardware documentation, seeing the label CFI for this bit does not mean the bit position changed. The TCI layout still places it between PCP and the 12-bit VLAN ID.

Example: VLAN ID 100

For a tag with PCP 0, DEI 0 and VLAN ID 100:

VLAN ID = 100 100 decimal = 0x064 PCP = 0 DEI = 0 TCI: 0x0064 Binary: 000 0 000001100100

Example: PCP 1 and VLAN 100

PCP 1 occupies bits 15 through 13.

PCP: 1 << 13 = 0x2000 VLAN ID: 100 = 0x0064 TCI: 0x2000 | 0x0064 = 0x2064

The decoder therefore reports PCP 1, DEI 0 and VLAN ID 100.

Example: PCP 5, DEI 1, VLAN 100

PCP = 5 5 << 13 = 0xA000 DEI = 1 1 << 12 = 0x1000 VID 100 = 0x0064 TCI: 0xA000 | 0x1000 | 0x0064 = 0xB064

That TCI decodes back to PCP 5, DEI 1 and VLAN ID 100.

What Is TPID 0x8100?

TPID stands for Tag Protocol Identifier. The common IEEE 802.1Q VLAN TPID is:

0x8100

When an Ethernet parser sees this value where the EtherType normally appears, it indicates that VLAN tag information follows.

Other VLAN TPID Values

Networks using provider bridging or stacked VLAN tags can use other TPID values. A commonly encountered example is:

0x88A8

This is frequently associated with provider bridging / service VLAN tagging. Other implementations can use additional TPID values.

VLAN ID 0

A VLAN ID field of zero has a special meaning. It is used for priority-tagged frames rather than representing an ordinary VLAN numbered zero.

VID = 0 → Priority Tagged

PCP and DEI information can still be meaningful in such a frame.

Valid VLAN ID Range

The 12-bit VLAN ID field can mathematically hold values from 0 to 4095, but ordinary configurable VLAN IDs are generally:

1 through 4094

The decoder separately reports the special values 0 and 4095 rather than calling all 4096 bit patterns ordinary VLAN IDs.

VLAN ID 4095

The all-ones 12-bit VID value is:

111111111111 Decimal: 4095 Hex: 0xFFF

This VID is reserved and should not be treated as a normal configurable VLAN.

Decode Complete VLAN Tag 81 00 00 64

81 00 00 64 TPID: 81 00 = 0x8100 TCI: 00 64 = 0x0064 PCP: 0 DEI: 0 VID: 100

VLAN Tag vs Ethernet EtherType

Without VLAN tagging, the Ethernet field after the source MAC address normally contains EtherType directly. With 802.1Q tagging, a VLAN TPID occupies that position, followed by TCI, and the original EtherType follows the VLAN tag.

Untagged: Destination MAC Source MAC EtherType Payload 802.1Q Tagged: Destination MAC Source MAC TPID TCI EtherType Payload

Single VLAN Tag vs QinQ

Single Tag

One TPID + TCI pair is inserted into the Ethernet frame.

Stacked Tags

QinQ or provider bridging can place multiple VLAN tags in the same frame.

This page decodes one VLAN tag at a time so each PCP, DEI and VID field remains unambiguous.

VLAN Tag Decoder FAQs

What is a VLAN tag?
A VLAN tag is an Ethernet header extension containing a Tag Protocol Identifier and Tag Control Information used to carry VLAN and priority information.
How many bits is a VLAN ID?
The VLAN ID field is 12 bits wide.
What is the VLAN ID mask?
The VLAN ID is extracted using TCI & 0x0FFF.
How many bits is PCP?
PCP is three bits wide and therefore ranges from 0 through 7.
What is DEI in VLAN?
DEI is the Drop Eligible Indicator bit in the VLAN TCI field.
What is CFI in a VLAN tag?
CFI is an older name associated with the bit now used as the Drop Eligible Indicator in modern 802.1Q Ethernet tagging.
What does TPID 0x8100 mean?
0x8100 is the commonly used TPID identifying an IEEE 802.1Q VLAN tag.
What does TPID 0x88A8 mean?
0x88A8 is commonly used with provider bridging or service VLAN tagging.
What is VLAN ID 0?
VID 0 indicates a priority-tagged frame rather than an ordinary VLAN numbered zero.
What is VLAN ID 4095?
4095 is the all-ones 12-bit VID and is reserved.
What VLAN IDs are normally usable?
VLAN IDs 1 through 4094 are normally available as ordinary VLAN identifiers.
How do I decode a VLAN TCI value?
Use bits 15–13 for PCP, bit 12 for DEI and bits 11–0 for VLAN ID.
What is VLAN TCI 0x0064?
It represents PCP 0, DEI 0 and VLAN ID 100.
What is VLAN TCI 0x2064?
It represents PCP 1, DEI 0 and VLAN ID 100.
What is VLAN TCI 0xB064?
It represents PCP 5, DEI 1 and VLAN ID 100.
Can Ethernet contain more than one VLAN tag?
Yes. VLAN stacking such as QinQ can carry multiple VLAN tags.
Does VLAN tagging change the MAC addresses?
No. The VLAN tag is inserted into the Ethernet header; source and destination MAC addresses remain separate fields.
Can PCP queue behavior differ between switches?
Yes. PCP supplies priority information, while the actual queue and forwarding policy is configured by the network equipment.

Decode IEEE 802.1Q VLAN Tags

Enter TCI bytes or a complete VLAN tag to calculate PCP, DEI and VLAN ID, inspect TPID, verify reserved VID values and view the exact 16-bit VLAN Tag Control Information layout.

Scroll to Top