Parse IPv4 Header

Input Hex Raw
Output
Example IPv4 Headers

Standard IPv4 Header (Hex):

4500002c73a700008011b861c0a80101c0a801c8

IPv4 with Options (Hex):

4600003473a700008006b857c0a80101c0a801c8
💡 IPv4 Header Structure:
  • Version (4 bits)
  • Internet Header Length (IHL) (4 bits)
  • Differentiated Services Code Point (DSCP) (6 bits)
  • Explicit Congestion Notification (ECN) (2 bits)
  • Total Length (2 bytes)
  • Identification (2 bytes)
  • Flags (3 bits)
  • Fragment Offset (13 bits)
  • Time To Live (TTL) (1 byte)
  • Protocol (1 byte)
  • Header Checksum (2 bytes)
  • Source IP Address (4 bytes)
  • Destination IP Address (4 bytes)
  • Options (variable length, if IHL > 5)
Properties
Analyse an IPv4 header to view details

Given an IPv4 header, parses and displays each field in an easily readable format.

Analyse IPv4 Header Restart

Parse IPv4 Header: The Online IPv4 Header Parser for Network Analysts

Why Parse Raw IPv4 Headers?

When analyzing low-level network traffic, debugging raw sockets, or competing in cybersecurity Capture The Flag (CTF) events, network engineers frequently encounter raw packet data represented as hexadecimal (Hex) strings. Tools like Wireshark or tcpdump can capture this data, but manually extracting the specific routing and protocol information from a continuous hex string is tedious and error-prone.

The IPv4 header (defined in RFC 791) contains critical information for internet routing, including the Time to Live (TTL), the underlying Protocol (e.g., TCP, UDP, ICMP), and the Source and Destination IP addresses. Our online IPv4 Header Parser instantly decodes your raw hexadecimal payload, performs the necessary bitwise operations, and presents the 20+ byte header in a clean, human-readable format.

Engineered for Security: 100% Client-Side Processing

As security professionals, we know that network packet captures often contain sensitive infrastructure data, including internal IP schemes and potentially confidential metadata.

  • Zero Server Logs: We never transmit, save, or log your hexadecimal payloads or the resulting IP addresses.

  • Absolute Local Execution: The parsing engine runs completely offline within your web browser's local sandbox memory.

  • Instant Decoding: Because no data is sent to a backend server, the hex-to-field translation happens instantaneously.

How to Decode an IPv4 Hex String Online?

Translating your raw packet dump into structured data is simple:

  1. Input Your Hex Payload: Paste your continuous hexadecimal string into the input box. A standard IPv4 header without options requires a minimum of 40 hex characters (20 bytes). Ensure there are no spaces or non-hex characters for the best result.

  2. Instant Parsing: Our local JavaScript engine immediately processes the bytes according to RFC specifications.

  3. Analyze the Structured Output: The tool will automatically separate and display the fields:

    Version & IHL: Validates the IPv4 protocol and calculates the Internet Header Length (IHL).

    TOS / DSCP: Displays the Type of Service / Differentiated Services flags.

    Total Length & Identification: Shows the total packet size and ID used for fragmentation.

    Flags & Fragment Offset: Crucial for understanding fragmented packet reconstruction.

    TTL & Protocol: Identifies the hop limit and the encapsulated protocol (e.g., 06 for TCP, 11 for UDP).

    Source & Destination IP: Converts the 32-bit hex values into standard dotted-decimal IP addresses (e.g., 192.168.1.1).

Frequently Asked Questions (FAQ)

  • Q: What is the minimum length of an IPv4 header?

    A: A standard IPv4 header without any optional fields is exactly 20 bytes long. Because each byte is represented by two hexadecimal characters, your input string must contain at least 40 hex characters to be parsed successfully.

  • Q: How does the parser calculate the Internet Header Length (IHL)?

    A: The IHL field is a 4-bit value located in the first byte of the header (alongside the Version). It specifies the length of the header in 32-bit words. Our parser extracts this 4-bit value and multiplies it by 4 to give you the actual header size in bytes (usually 20 bytes, up to a maximum of 60 bytes if Options are present).

  • Q: Why do I get an "Invalid Hex" error?

    A: This error occurs if your input contains characters outside the standard hexadecimal range (0-9, A-F). Please ensure you have stripped out any spaces, colons, or "0x" prefixes from your raw packet dump before pasting.

  • Q: Can this tool parse IPv6 headers?

    A: No, this specific tool is strictly designed for the architecture of IPv4 headers (RFC 791). IPv6 headers have a completely different, fixed 40-byte structure. Please use our dedicated IPv6 tools for modern packet analysis.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Generate a comprehensive and SEO-friendly XML sitemap instantly with our free online XML Sitemap Generator. Perfect for webmasters and SEO professionals to help search engines crawl and index your website efficiently.

XML Sitemap Generator

Generate a comprehensive and SEO-friendly XML sitemap instantly with our free online XML Sitemap Generator. Perfect for webmasters and SEO professionals to help search engines crawl and index your website efficiently.
Seamlessly convert code between Markdown and HTML with our free online Markdown & HTML Converter. Enjoy 100% secure, browser-based processing with no server uploads and instant results.

Markdown & HTML Converter

Seamlessly convert code between Markdown and HTML with our free online Markdown & HTML Converter. Enjoy 100% secure, browser-based processing with no server uploads and instant results.
Converts Keys in PEM format to a JSON Web Key format and Converts Keys in JSON Web Key format to PEM format (PKCS#8). Securely convert PEM to JWK and JWK to PEM (PKCS#8) online. 100% private, client-side processing. No server uploads. Perfect for JWT and OAuth2 developers.

PEM & JWK Converter

Converts Keys in PEM format to a JSON Web Key format and Converts Keys in JSON Web Key format to PEM format (PKCS#8). Securely convert PEM to JWK and JWK to PEM (PKCS#8) online. 100% private, client-side processing. No server uploads. Perfect for JWT and OAuth2 developers.
Compresses eXtensible Markup Language (XML) code by removing unnecessary whitespace, line breaks, and optionally comments.

XML Minify

Compresses eXtensible Markup Language (XML) code by removing unnecessary whitespace, line breaks, and optionally comments.