DSCP to ToS Converter
Convert between DSCP values, the legacy ToS byte, IP Precedence and PHB names like EF, AF31 and CS5, in decimal, hex and binary side by side.
Every representation of this marking
| Field | Decimal | Hex | Binary |
|---|---|---|---|
| DSCP (6 bits) | 46 | 0x2E | 101110 |
| ToS / DS byte (8 bits) | 184 | 0xB8 | 10111000 |
| IP Precedence (3 bits) | 5 | 0x5 | 101 |
| ECN (2 bits) | 0 | 0x0 | 00 |
EF — Expedited Forwarding — VoIP bearer traffic (RFC 3246). IP Precedence 5 is “CRITIC/ECP”.
The ToS byte is simply DSCP × 4 plus the two ECN bits, because DSCP occupies the top six bits of the same octet. Legacy set ip tos commands take the byte value; modern set dscp takes the 6-bit value or the name.
Standard per-hop behaviours
| Name | DSCP | Binary | ToS | Hex | Prec. | Typical use |
|---|---|---|---|---|---|---|
| CS0 / DF | 0 | 000000 | 0 | 0x00 | 0 | Default forwarding — best effort |
| CS1 | 8 | 001000 | 32 | 0x20 | 1 | Scavenger / lower-than-best-effort bulk |
| AF11 | 10 | 001010 | 40 | 0x28 | 1 | High-throughput data, low drop precedence |
| AF12 | 12 | 001100 | 48 | 0x30 | 1 | High-throughput data, medium drop precedence |
| AF13 | 14 | 001110 | 56 | 0x38 | 1 | High-throughput data, high drop precedence |
| CS2 | 16 | 010000 | 64 | 0x40 | 2 | OAM / network management |
| AF21 | 18 | 010010 | 72 | 0x48 | 2 | Low-latency transactional data, low drop |
| AF22 | 20 | 010100 | 80 | 0x50 | 2 | Low-latency transactional data, medium drop |
| AF23 | 22 | 010110 | 88 | 0x58 | 2 | Low-latency transactional data, high drop |
| CS3 | 24 | 011000 | 96 | 0x60 | 3 | Call signalling (SIP, H.323, SCCP) |
| AF31 | 26 | 011010 | 104 | 0x68 | 3 | Multimedia streaming, low drop |
| AF32 | 28 | 011100 | 112 | 0x70 | 3 | Multimedia streaming, medium drop |
| AF33 | 30 | 011110 | 120 | 0x78 | 3 | Multimedia streaming, high drop |
| CS4 | 32 | 100000 | 128 | 0x80 | 4 | Real-time interactive video |
| AF41 | 34 | 100010 | 136 | 0x88 | 4 | Multimedia conferencing, low drop |
| AF42 | 36 | 100100 | 144 | 0x90 | 4 | Multimedia conferencing, medium drop |
| AF43 | 38 | 100110 | 152 | 0x98 | 4 | Multimedia conferencing, high drop |
| CS5 | 40 | 101000 | 160 | 0xA0 | 5 | Broadcast video |
| VA | 44 | 101100 | 176 | 0xB0 | 5 | Voice-Admit — capacity-admitted voice |
| EF | 46 | 101110 | 184 | 0xB8 | 5 | Expedited Forwarding — VoIP bearer traffic |
| CS6 | 48 | 110000 | 192 | 0xC0 | 6 | Network control (routing protocols) |
| CS7 | 56 | 111000 | 224 | 0xE0 | 7 | Reserved for network control |
What is the DSCP to ToS Converter?
QoS markings get written four different ways depending on which command you are reading, and this converter lines all of them up.
- Converts in four directions: DSCP, PHB name, ToS byte and IP Precedence
- Every field shown in decimal, hexadecimal and binary at the same time
- Full CS0–CS7, AF11–AF43, EF and VA table with typical uses and source RFCs
- ECN bits handled separately, so the full DS octet is always correct
- Copyable plain-text summary including the Cisco set dscp and set ip tos forms
- Reference table highlights the marking you entered — all computed locally
How to use the DSCP to ToS Converter
- 1
Choose what you are converting from: a DSCP value, a PHB name, a ToS byte or an IP Precedence level.
- 2
Type the value — names like EF, AF31, CS5, VA and DF all work, and ToS accepts 184 or 0xB8.
- 3
Pick the ECN bits if you care about the full octet; they are read from the byte automatically in ToS mode.
- 4
Read the four-row table for decimal, hex and binary of DSCP, the ToS byte, IP Precedence and ECN.
- 5
Scroll to the standard PHB table to compare your marking against the whole set.
About the DSCP to ToS Converter
QoS markings get written four different ways depending on which command you are reading, and this converter lines all of them up. Enter a DSCP value, a per-hop-behaviour name such as EF or AF31, a ToS byte in decimal or hex, or an IP Precedence level, and you get every other representation in decimal, hexadecimal and binary at once.
The relationship is simple once you see it: DSCP occupies the top six bits of the same octet the old ToS byte used, so the ToS value is just DSCP × 4, plus the two ECN bits in the bottom. IP Precedence is the top three bits, which is DSCP shifted right by three. EF, DSCP 46, is therefore ToS 184 — the 0xB8 you see in packet captures.
A full table of the standard per-hop behaviours from RFC 2474, 2597, 3246 and 5865 sits underneath, listing each name with its DSCP, binary, ToS, hex, precedence and typical use, and highlighting the marking you entered. It is meant for lining up a Cisco set dscp command against a legacy set ip tos value, or against what you actually see in a capture. Everything is computed locally in your browser and nothing is uploaded.
Frequently asked questions
How do I convert DSCP to a ToS value?
Multiply the DSCP value by 4. DSCP is the top six bits of the same byte the old ToS field used, so shifting left by two positions gives the byte value. DSCP 46 (EF) becomes ToS 184, which is 0xB8 in hex.
What DSCP value is EF?
EF, Expedited Forwarding, is DSCP 46 — binary 101110. It maps to ToS byte 184 (0xB8) and IP Precedence 5. It is the standard marking for VoIP bearer traffic, which needs low latency and low jitter above all else.
What do the AF class numbers mean?
In AFxy, x is the class from 1 to 4 and y is the drop precedence from 1 to 3. The DSCP value is 8x + 2y, so AF31 is 26 and AF43 is 38. Higher classes get better forwarding; higher drop precedence gets discarded first when a queue fills.
Is IP Precedence the same as DSCP?
Not quite. IP Precedence is the old three-bit field, and DSCP extended it to six bits in the same octet. The top three bits still line up, so DSCP 40 (CS5) is IP Precedence 5 — which is why the class selector code points exist at all: they are backward compatible with precedence.
What are the ECN bits and do they affect the DSCP?
The two lowest bits of the DS octet carry Explicit Congestion Notification, which routers use to signal congestion without dropping packets. They are separate from DSCP, but they are part of the same byte — which is why a ToS value read off the wire may not be an exact multiple of four.
Which DSCP should I use for voice and video?
The common convention is EF (46) for voice payload, CS3 (24) for call signalling, AF41 (34) for interactive video and CS6 (48) for network control. Those are defaults, not law — check what your carrier honours, because many remark or ignore markings at the edge.
Related tools
VoIP Bandwidth Calculator
Work out VoIP bandwidth per call for G.711, G.729, Opus and more, including RTP/UDP/IP, Ethernet, PPP and IPsec overhead, with and without cRTP.
Binary Calculator
Do arithmetic and bitwise math on binary, decimal, hex and octal numbers — add, subtract, multiply, divide, AND, OR, XOR and shifts, with results in all bases.
HEX to RGB Converter
Convert HEX color codes to RGB and RGBA instantly. Supports 3, 6 and 8-digit HEX with a live color swatch, batch list conversion and one-click copy.
Port Number Lookup
Look up what a TCP or UDP port is used for — search 150+ common well-known and registered ports by number, service name or protocol. Instant and offline.
Subnet Calculator
Calculate network address, broadcast, usable host range and subnet mask from any IPv4 address and CIDR prefix. Free, instant and 100% in your browser.