Guide
Reading the TCP flag byte: SYN, ACK, FIN and the rest
Every TCP segment carries a handful of flag bits that say what kind of segment it is: the start of a connection, a data segment, an acknowledgement, a close. Reading them from a capture, a firewall log or a textbook number is a basic troubleshooting skill. The page translates a flags value into names and meanings, and works in reverse by letting you tick the flags.
The nine flags
Counting from the low end: FIN (0x01) means the sender has finished. SYN (0x02) opens a connection and carries the initial sequence number. RST (0x04) aborts the connection. PSH (0x08) asks the receiver to hand data to the application at once. ACK (0x10) says the acknowledgement number is valid, which is true for every segment after the first. URG (0x20) marks the urgent pointer as significant and is almost never used. ECE (0x40) and CWR (0x80) support explicit congestion notification, and NS (0x100) is an experimental nonce extension (RFC 3540). Most captures show only the low eight bits.
Entering a value
Type the flags field in decimal, as 0x12, or in binary as 0b10010, or choose the quick buttons: SYN, SYN+ACK, ACK, PSH+ACK, FIN+ACK, RST and RST+ACK. Or tick any combination of the nine flags. The result lists the flags that are set, the value in decimal, hex and nine-bit binary, a plain-language meaning, and a table of all nine with their values, a tick for those set and a description.
What normal traffic looks like
A connection starts with a SYN (0x02), is answered by a SYN+ACK (0x12) and completed by an ACK (0x10). Data flows in ACK (0x10) or PSH+ACK (0x18) segments. One side closes with FIN+ACK (0x11) and the other responds the same way, followed by a final ACK, or either side aborts with RST (0x04) or RST+ACK (0x14). Anything else is unusual. A segment with no flags (NULL), with FIN, PSH and URG set (Xmas) or with SYN and FIN together is not part of any normal conversation. Scanners use them to probe how a host’s stack reacts, and many firewalls drop them.
A worked example
The sample is 18. The page shows the flags set as ACK, SYN, the value as 18 / 0x012 / 000010010 in decimal, hex and binary, and the meaning “Connection accepted: the second packet of the handshake”. In the table, ACK (0x010) and SYN (0x002) are ticked and the other seven flags are not. Adding the PSH flag (0x08) to the ACK gives 0x18, which is a data segment.
Limits
Flags alone do not tell the whole story. Whether a SYN is a scan or a normal client depends on what follows, and on state that a single packet does not show. The decoder explains the bits but cannot see sequence numbers, windows or timing. For a complete packet, paste the bytes into the Packet Header Decoder, which shows the flags in context. Building a capture filter for a particular flag is the job of the Wireshark Filter Builder.
Related tools
- Packet Header Decoder decodes the whole TCP header including flags.
- Wireshark Filter Builder writes filters that match specific flags.
- Port Number Lookup names the service behind a port.
- Hex to Binary Converter converts a flag byte for manual decoding.
Checked against the current version of the TCP Flags Decoder on .

