HDLC Data Link Frame Utility

HDLC Frame Decoder

Decode raw HDLC frame bytes and inspect opening and closing flags, address field, I-frame, S-frame or U-frame control information, send and receive sequence numbers, Poll/Final bit, payload and optional 16-bit HDLC FCS.

✓ I Frames ✓ S Frames ✓ U Frames ✓ Address Field ✓ N(S) / N(R) ✓ CRC-16 FCS
HDLC
HDLC Frame Decode
● Ready
Enter decoded octets from one HDLC frame. Opening and closing 7E flags are optional. Spaces, commas, colons, hyphens, line breaks, continuous hex and 0x-prefixed bytes are accepted.
The decoder removes one opening and one closing 0x7E flag before decoding.
CRC mode uses the common reflected HDLC/X.25 16-bit FCS calculation.
Decoder scope: the input must contain already reconstructed HDLC octets. Physical-layer serialization and zero-bit insertion/removal are not performed here. The one-byte control decoder uses the common modulo-8 HDLC I/S control format. Protocols derived from HDLC can use different address or control conventions.
HDLC Frame Decode Result Frame Decoded
Decoded HDLC Frame
Frame Type
Address
Address Length
Control
N(S)
N(R)
P/F Bit
Payload Length
FCS Received
FCS Calculated
FCS Status
Total Input
Control Field Decode
Information / Payload
Frame Breakdown
Validation

What Is an HDLC Frame?

HDLC, or High-Level Data Link Control, is a bit-oriented data-link protocol. A conventional frame contains a flag sequence, address field, control field, optional information data and a frame check sequence before the closing flag.

Flag Address Control Information FCS Flag

HDLC Flag Byte

The standard HDLC flag pattern is binary 01111110, represented as hexadecimal 0x7E when displayed as a reconstructed octet.

Binary: 01111110 Hex: 7E

The same pattern can delimit the end of one frame and the beginning of another.

HDLC Bit Stuffing

HDLC prevents the flag pattern from appearing accidentally inside frame data by inserting a zero bit after a run of five consecutive one bits during transmission.

The receiver removes those inserted bits before reconstructing the address, control, information and FCS octets. This decoder expects those reconstructed octets rather than a raw stuffed bit stream.

HDLC Address Field

HDLC supports address fields of one or more octets. In commonly used extended address representations, the least significant bit acts as an extension indicator. An octet with its low bit equal to one marks the final address octet.

Address octet LSB: 0 More address octets follow 1 Final address octet

The exact semantic interpretation of the address bits depends on the protocol profile using HDLC.

HDLC Frame Types

Type Name Purpose
I Information Transfers user information and sequence acknowledgements
S Supervisory Flow control and acknowledgement functions
U Unnumbered Link management and unnumbered information

HDLC I-Frame Control Field

For the common one-octet modulo-8 control format, an Information frame has bit 0 equal to zero.

Bit 0: 0 → I-frame N(S): bits 3:1 P/F: bit 4 N(R): bits 7:5

N(S) is the transmit sequence number and N(R) carries the next expected receive sequence number.

HDLC Supervisory Frames

Supervisory frames have the low two control bits equal to binary 01. Two additional bits identify the supervisory function.

S Bits Frame Meaning
00RRReceive Ready
01RNRReceive Not Ready
10REJReject
11SREJSelective Reject

HDLC Unnumbered Frames

Unnumbered frames have their low two control bits equal to binary 11. Their remaining function bits identify link-management commands and responses.

Common U-frame controls include UI, SABM, SABME, DISC, UA, DM and FRMR, although not every HDLC-derived protocol uses every command.

HDLC Poll/Final Bit

The P/F bit occupies bit 4 in the common one-byte control format. When a frame is sent as a command it can act as the Poll bit; in a response it can act as the Final bit.

HDLC Frame Check Sequence

HDLC frames commonly include an FCS for error detection. A widely used 16-bit HDLC FCS uses the reflected polynomial associated with CRC-16/X.25.

Common 16-bit parameters: Polynomial: 0x1021 Reflected polynomial: 0x8408 Initial value: 0xFFFF Input reflected: Yes Output reflected: Yes Final XOR: 0xFFFF

On the wire, the two FCS octets are commonly transmitted least-significant octet first. Different HDLC profiles can use different FCS widths or framing rules, so the decoder allows FCS checking to be disabled.

HDLC vs PPP

PPP uses HDLC-like framing but defines its own field conventions, including well-known address and control values and protocol identification fields. A generic HDLC decoder should therefore not assume that every HDLC-looking frame is a native ISO HDLC information frame.

HDLC Frame Decoder FAQs

What is the HDLC flag value?
The standard HDLC flag pattern is 01111110, normally displayed as hexadecimal 0x7E after the bit stream has been reconstructed into octets.
How do I identify an HDLC I-frame?
In the common one-byte modulo-8 control format, control bit 0 equals zero for an Information frame.
What do N(S) and N(R) mean?
N(S) is the send sequence number. N(R) indicates the next frame sequence number the sender expects to receive and therefore acts as an acknowledgement.
What does RR mean in HDLC?
RR means Receive Ready. It is a supervisory frame used to acknowledge received frames and indicate that the receiver is ready for more traffic.
What does REJ mean in HDLC?
REJ is the Reject supervisory function and can request retransmission according to the active HDLC procedure.
What is an HDLC U-frame?
A U-frame is an unnumbered frame primarily used for link-control functions or unnumbered information.
Does this tool remove HDLC bit stuffing?
No. Enter reconstructed hexadecimal octets after bit unstuffing. A raw serial bit stream requires physical/bit-layer processing before frame-field decoding.
Can every HDLC frame use the same CRC?
No. The tool checks the common 16-bit HDLC/X.25 FCS, but some protocol profiles use a different FCS width or framing convention.
Scroll to Top