Base32 Encoder Decoder
Encode UTF-8 text or hex bytes as RFC 4648 Base32, or decode canonical Base32 into hex, text and a byte file.
Open toolEnter a TCP flags byte in hex (such as 0x12), decimal (18), 8-bit binary (00010010), or flag names (SYN, ACK) in the TCP Flag Decoder below to inspect set bits, RFC semantics, and tcpdump/Wireshark filter expressions.
Enter the inputs, then select Decode TCP Flags.
Result will appear here
The TCP Flag Decoder parses your input into an 8-bit unsigned integer (0 to 255), tests each bitmask position from bit 7 (CWR = 128) down to bit 0 (FIN = 1), and maps the combination to standard RFC 793 / RFC 3168 packet states.
Byte = 128*CWR + 64*ECE + 32*URG + 16*ACK + 8*PSH + 4*RST + 2*SYN + 1*FIN.
Outputs ready-to-use packet capture filters for both Wireshark (tcp.flags == 0xXX) and tcpdump ('tcp[13] == N').
Review the input parameters, allowed value ranges, and worked reference cases for the TCP Flag Decoder below before running your calculation.
| Parameter / Scenario | Default / Sample Value | Rule or Allowed Range | Output / Usage Note |
|---|---|---|---|
| Input: TCP flags byte or flag names | 0x12 | Enter a byte value (0-255 in hex 0x00..0xFF, decimal 0..255, 8-bit binary) or comma/space-separated flag names. | Required workspace parameter |
| Input: Input format | auto | Options: Auto-detect (Hex 0x.., Flag names, Binary, or Decimal), Hexadecimal byte (00 to FF), Decimal integer (0 to 255), 8-bit binary string (00000000 to 11111111) | Required workspace parameter |
| Worked Case 1: Handshake step 2: 0x12 (Decimal 18 -> SYN + ACK) | Preloaded / test values | Flags Byte = sum of set bits: FIN(1) + SYN(2) + RST(4) + PSH(8) + ACK(16) + URG(32) + ECE(64) + CWR(128) | Decoding 0x12 (binary 00010010) activates SYN (2) and ACK (16), representing the server's SYN-ACK response in a standard 3-way handshake. |
| Worked Case 2: Data push: 'PSH, ACK' (Decimal 24 -> 0x18) | Preloaded / test values | Flags Byte = sum of set bits: FIN(1) + SYN(2) + RST(4) + PSH(8) + ACK(16) + URG(32) + ECE(64) + CWR(128) | Entering 'PSH, ACK' sums PSH (8) + ACK (16) = 24 (0x18, binary 00011000), indicating payload delivery that should be pushed immediately to the receiving application. |
Paste a raw flags value from tcpdump, Zeek, iptables, or NetFlow records to see which bits are active.
Type a hex byte (e.g., 0x12), decimal integer (e.g., 18), 8-bit binary string (e.g., 00010010), or flag list (e.g., SYN, ACK).
Leave Input format on Auto-detect or explicitly enforce Hexadecimal, Decimal, Binary, or Flag names.
Click Decode TCP Flags to view active flags, hex/decimal/binary conversions, packet state notes, and Wireshark/tcpdump filter syntax.
Review common TCP handshake, data transfer, and teardown flag bytes.
Decoding 0x12 (binary 00010010) activates SYN (2) and ACK (16), representing the server's SYN-ACK response in a standard 3-way handshake.
Entering 'PSH, ACK' sums PSH (8) + ACK (16) = 24 (0x18, binary 00011000), indicating payload delivery that should be pushed immediately to the receiving application.
Entering 0x03 activates both SYN (2) and FIN (1), which is flagged as an anomalous combination because a segment should not simultaneously initiate and close a connection.
Use the bit-by-bit table and capture filter strings when writing firewall rules or inspecting pcaps.
The main result displays the active flag acronyms and hex byte. The breakdown cards show Decimal, Hexadecimal, 8-bit Binary, TCP state description, and Wireshark/tcpdump filter expressions, while the text export lists all 8 bit positions (Bit 7 CWR through Bit 0 FIN) as 1 (SET) or 0 (CLEAR).
Note the scope of the 8-bit byte at TCP header offset 13.
This tool decodes the 8-bit flags byte at TCP header offset 13 (FIN, SYN, RST, PSH, ACK, URG, ECE, CWR) within 0..255. The experimental NS (Nonce Sum) bit in byte 12 is outside the 8-bit offset-13 byte. Flag combinations describe protocol mechanics only and do not constitute an automated security verdict.
Encode UTF-8 text or hex bytes as RFC 4648 Base32, or decode canonical Base32 into hex, text and a byte file.
Open tool
Group binary digits into eight-bit bytes and decode them as strict UTF-8.
Open tool
Convert hex, decimal, or binary byte arrays to UTF-8 strings with strict validation, or encode text into hex, decimal, and JSON byte arrays.
Open toolChoose another tool for your next calculation, conversion, or text task.

Encode ASCII characters as space-separated decimal code values.
Open tool
Encode text as eight-bit binary UTF-8 bytes.
Open toolEncode bytes as Base58 or decode Base58 with the Bitcoin alphabet or your own explicit 58-character alphabet.
Open toolDecode an ECC200 Data Matrix from a clear image locally.
Open toolAnswers about using TCP Flag Decoder and understanding its results.
From least significant bit (bit 0) to most significant bit (bit 7): FIN = 1 (0x01), SYN = 2 (0x02), RST = 4 (0x04), PSH = 8 (0x08), ACK = 16 (0x10), URG = 32 (0x20), ECE = 64 (0x40), and CWR = 128 (0x80).
0x12 in hexadecimal equals 18 in decimal, which is 16 (ACK, 0x10) + 2 (SYN, 0x02). In binary, 18 is 00010010, setting the ACK and SYN bits during step 2 of the TCP 3-way handshake.
Yes. Type 'PSH, ACK' (or 'PA') in Auto-detect or Flag names mode, and the decoder computes 8 + 16 = 24 (0x18, binary 00011000) along with the tcpdump filter expression.
A classic TCP Christmas tree packet sets every control bit or FIN+URG+PSH simultaneously (e.g., 0x29 = 41 for FIN+PSH+URG, or 0xFF = 255 for all 8 bits). The decoder highlights unusual combinations such as SYN+FIN or SYN+RST.
Choose another tool for your next calculation, conversion, or text task.