DSCP / QoS Converter
Translate a QoS marking between DSCP (EF, AFxy, CSx), the ToS/DS byte in hex and binary, IP Precedence and 802.1p CoS, with the meaning of each class (PHB). Type a number 0–63, a name or the byte 0–255. Everything in your browser.
Class meaning (PHB)
—
DS / ToS byte breakdown
| Bits | Field | Value |
|---|
DSCP bits (7–2) ECN bits (1–0, here 0)
Common QoS markings
| Name | DSCP | ToS hex | Prec. | CoS |
|---|
How it is calculated · DSCP, ToS, IP Precedence and CoS
1. The DSCP is the top
6 bits of the differentiated services (DS) byte,
formerly the ToS field. It ranges from 0 to 63.
2. The full byte is
ToS = DSCP × 4 (DSCP << 2): the DSCP
occupies bits 7–2 and the low 2 bits (1–0) are
ECN, here set to 0.
3. The IP Precedence and the
suggested 802.1p CoS are the top 3 bits:
DSCP ÷ 8 (DSCP >> 3),
from 0 to 7.
4. Names: CSx = x·8,
AFxy = 8·x + 2·y (class x, drop
precedence y) and EF = 46 for low-latency voice.
Runs locally in your browser · no sign-up · nothing leaves your browser.
How it works
The converter translates a QoS marking across all its representations: DSCP (0-63, the top 6 bits of the differentiated services byte defined in RFC 2474), its standard name (default, CS0 to CS7, AF11 to AF43, EF), the full ToS/DS byte in decimal, hex and binary, the legacy IP Precedence and the suggested 802.1p CoS for the Ethernet frame. It auto-detects the input format: name, number or hex (0x…).
The conversions follow the DiffServ specification: ToS byte = DSCP × 4 (DSCP sits in bits 7-2; bits 1-0 are ECN), IP Precedence = CoS = DSCP ÷ 8 (the top 3 bits), CSx = x × 8, AFxy = 8x + 2y (RFC 2597) and EF = 46 (RFC 3246). It also describes the PHB (per-hop behavior) of each class: how that traffic is treated in the queues of a router or switch.
Example: decoding the EF voice marking
- Type
EF(or 46): it is the standard DSCP for real-time voice, Expedited Forwarding (RFC 3246). - ToS/DS byte:
46 × 4 = 184 = 0xB8, the value you will see in Wireshark captures or legacy configurations. - IP Precedence and CoS:
46 ÷ 8 = 5, so on the VLAN the traffic should be marked with 802.1p CoS 5.