Skip to content
uencoder
TASK

Build and inspect network packets

Construct raw network packets for testing, debugging, and protocol development. Understand Ethernet, IP, and transport layer encapsulation.

  1. 1

    A network packet is built by encapsulation: application data → transport header (TCP/UDP) → IP header → Ethernet header. Each layer adds its header. The Ethernet header (14 bytes) contains destination MAC, source MAC, and EtherType (0x0800 for IPv4, 0x86DD for IPv6).

  2. 2
    Hex Encoder →

    Encode the packet fields as hex. Build the Ethernet header (dst MAC + src MAC + EtherType), then IP header (version, IHL, TTL, protocol, IPs), then transport header (ports, seq, flags). Concatenate the layers to form the raw packet.

  3. 3
    Binary Encoder →

    Encode specific fields in binary for bit-level control. The IP flags (Reserved, DF, MF) are 3 bits. The TCP flags (FIN, SYN, RST, PSH, ACK, URG) are 6 bits. Binary encoding gives precise control over individual flags.

Frequently asked questions

What is encapsulation?
Each layer wraps the layer above it. The application data is wrapped in a TCP segment (TCP header + data), which is wrapped in an IP packet (IP header + TCP segment), which is wrapped in an Ethernet frame (Ethernet header + IP packet + FCS). Each layer is independent.
Why build raw packets?
For network testing (verify protocol implementations), security research (craft specific flag combinations), debugging (reproduce issues with specific packet patterns), and learning (understand protocols at the byte level). Tools like Scapy (Python) and hping3 are used for this.

Workflows that solve this

Convert Base32 to Hex
Decode Base32 and re-encode as hex for debugging.
PIPELINE
Convert Base64 to Hex
Decode a Base64 string into raw bytes and re-encode it as hexadecimal for inspection or interop.
PIPELINE
Convert Binary to Hex
Decode a binary (base-2) string into its byte value and re-encode as hexadecimal.
PIPELINE
ChaCha20 Encrypt then Hex
ChaCha20 encrypt then hex-encode the ciphertext.
PIPELINE
Hex encode then decode round-trip
Encode text to hexadecimal and decode it back to verify the round-trip preserves the original data.
PIPELINE
Hex-encode text and analyze
Convert text to its hexadecimal representation then compute character statistics on the hex output.
PIPELINE
Convert Multibase to Hex
Decode multibase and re-encode as plain hex.
PIPELINE
Convert Octal to Binary
Decode an octal (base-8) number into its numeric value and re-encode as a binary string.
PIPELINE
Convert Octal to Hex
Decode octal and re-encode as hex for compact representation.
PIPELINE
Reverse text and show hex encoding
Reverse a string then inspect its hexadecimal representation — useful for debugging byte-order issues and encoding puzzles.
PIPELINE
SHA-512 Hash then Hex Encode
Compute SHA-512 hash then encode as hex for readability.
PIPELINE
Decode URL and show hex bytes
Percent-decode a URL-encoded string then view its hexadecimal byte representation for low-level analysis.
PIPELINE
Encode a text payload for URL transport
Percent-encode text then show its hex representation for safe URL parameter transport.
PIPELINE
XXencode then Hex
XXencode text then hex-encode the result.
PIPELINE

Learn more

Want to understand why?

Related tools