Tested tool guide
Tested browser tools
Checked August 16, 2026
What TCP Flag Calculator does, with a checked example
Six bits in every TCP header decide whether a packet opens a connection, acknowledges data, or tears it down. This tool takes a TCP flags value in decimal, hex, or binary and returns the other two notations plus the set of flags it encodes - SYN, ACK, FIN, RST, PSH, URG - shown as a labeled bit pattern. The thing people get wrong most often: the flags are numbered from the least significant bit, so SYN is 2 and FIN is 1, and SYN+ACK is 0x12 (18), not 0x03.
Worked example
A concrete input and expected output from the current implementation.
->
Expected output
Decimal 18, hex 0x12, binary 00010010. Flags set: SYN + ACK. Six-bit field (URG ACK PSH RST SYN FIN): 0 1 0 0 1 0.
ACK has weight 16 (bit 4) and SYN weight 2 (bit 1), so the two sum to 18, which is 0x12. The conversion checks out in both directions: the number decodes to exactly those two flags, and adding the two weights reproduces the number.