PCAP File Analyzer
Operator: Abdulla Al Fahad. How tools are built and checked
A packet capture answers questions that logs cannot, such as which host a laptop really talked to, whether a name resolved before the connection failed, or what a mobile app sent in clear text, but a raw .pcap is a stream of bytes that needs a decoder to say any of it.
This page reads pcap and pcapng files and turns them into five views: a packet list with a filter, conversations grouped by endpoints, hosts ranked by bytes, every DNS question with its answers, and the HTTP/1 requests and TLS server names it can find. Decoding runs in a background worker that reports progress and can be cancelled, so even a capture of hundreds of thousands of packets does not freeze the page.
It is a reader, not a replacement for a full protocol dissector: it decodes the layers listed below and shows everything else as a protocol number with a length.
Key features
- pcap with microsecond or nanosecond timestamps in either byte order, and pcapng with section, interface description and enhanced packet blocks
- Ethernet (with VLAN tags), Linux cooked capture, BSD loopback and raw IP link layers; IPv4 with fragment notes; IPv6 with extension headers; TCP, UDP, ICMP and ICMPv6
- DNS over UDP with compressed names and answers for A, AAAA, CNAME, NS, PTR, MX, TXT and SRV records
- HTTP/1.x requests and responses and TLS Client Hello and Server Hello messages, taken from a bounded per-direction reassembly of the first 16 KB of each TCP stream
- A display filter with and, or, not and parentheses over addresses, ports, length, DNS names, HTTP hosts and TLS server names
- CSV export of the filtered packet list, conversations, DNS records and HTTP messages
What is decoded from each packet and what is not
Classic pcap starts with a 24-byte header whose magic number tells the byte order and the timestamp unit (a1b2c3d4 microseconds, a1b23c4d nanoseconds, and their byte-swapped forms), followed by 16-byte record headers. pcapng is a series of blocks that each begin with a type and a total length: a section header, one or more interface descriptions carrying the link type and the timestamp resolution, then packet blocks. The page checks that every length fits inside the file and stops with the packets it already has if one does not, saying where the file went wrong.
A conversation is the set of packets between the same two endpoints with the same protocol, counted in both directions. DNS and HTTP packets stay inside their TCP or UDP conversation. TLS is only read from the unencrypted handshake: the server name in the Client Hello shows which site was requested, and it is empty when the client used Encrypted Client Hello or the capture starts after the handshake.
How it works
Each packet is decoded once, from the link layer upward, into a small record with its time, addresses, ports, protocol label and a one-line summary like the one Wireshark prints. Reading the file stops adding packets after 250,000, but the file is still scanned so the packet count and last timestamp are exact.
For TCP, payloads are collected per direction in sequence order, ignoring retransmitted bytes and holding at most 8 segments that arrive early. Once a stream has 16 KB or the capture ends, the collected bytes are searched for a request line, a status line or a TLS record. Because of that, a response whose headers are split across several segments is still read, while a body past 16 KB is not.
DNS names follow compression pointers with a jump limit of 16, and a pointer that leads outside the message or loops makes that packet an ordinary UDP packet instead of a DNS one.
When this helps
- A developer is told an app "can't reach the server", captures on the device, and the DNS tab shows the name resolving to an address the app never connects to.
- A support engineer filters tls.sni contains "payments" to confirm a checkout attempt reached the payment host before it was reset.
- A sysadmin checking a branch-office firewall capture of about 90,000 packets opens Top talkers, sees one internal host sending most of the bytes, and filters ip.src to that address to see which ports it was calling.
- A QA engineer exports the HTTP CSV from a capture of an old device that still speaks plain HTTP, and finds the one request whose Server header names a firmware version that was supposed to be patched.
Opening a file
- Drop a .pcap or .pcapng file of up to 300 MB (or press Load example for the built-in capture); watch the progress count and use Cancel if it is not the file you meant.
- Start on the Packets tab and type one filter expression, such as dns or ip.addr == 192.168.1.1, then press Enter or Apply.
- Open Conversations or Top talkers to see which endpoints carry the bytes.
- Open DNS, HTTP and TLS for the names, requests and server names found.
- Download the tables you need as CSV.
Example
The built-in 17-packet capture (1,617 bytes): one client talking to a resolver and two servers, filtered with
ip.addr == 192.168.1.1 and (dns or icmp) and not udp.port == 40112Packets that match, and what the other tabs show
Packets 1, 2, 16, 17: DNS query and response for example.org (A 93.184.216.34), ICMP echo request and reply
HTTP: GET /index.html (Host example.org), then 200 OK text/html
TLS: Client Hello, SNI api.example.net, ALPN h2 and http/1.1, 5 cipher suites
5 conversations in 0.622 secondsTips for best results
- Filter on ip.addr with a prefix such as 10.0.0.0/8 to separate internal traffic from everything else in one step.
- In Conversations, read the TCP flags seen column for how a connection sits in the capture: no SYN means it began before the capture did, and a SYN with no FIN or RST means it was still open when the capture ended.
- Use info contains "Client Hello" to jump to the start of every TLS connection, then read the server name in the TLS tab.
Limits
No decryption is attempted. HTTPS, HTTP/2 over TLS, QUIC and SSH show as encrypted payload; only the cleartext parts of a TLS handshake are read.
IP fragments are listed but not reassembled, so a fragmented DNS answer or HTTP request shows up as fragments with no application decoding.
Only HTTP/1.x is decoded. HTTP/2 prefaces and HTTP/3 are binary and appear as TCP or UDP packets.
Captures that stop at the 250,000th packet are marked as truncated at the top; the conversation and host tables then describe only those packets.
Linux cooked captures (the "any" interface) and loopback captures have no Ethernet addresses, so source and destination show IP addresses only.
Common errors and how to fix them
- "Not a pcap file: the magic number is not recognised."
- The first four bytes are neither a pcap nor a pcapng marker. Capture tools sometimes write compressed (.pcap.gz) or vendor formats such as Snoop or NetMon; decompress or re-save as pcap or pcapng first.
- "A record at byte 24 claims 2,147,483,647 bytes, so the file is damaged. The packets before it were read."
- The capture was cut, edited or is not a real pcap. Re-export it from the capture tool; if the first record is the one that fails, the file is probably not a capture at all.
Best practices
- Capture with a snap length of at least 256 bytes so TCP and TLS headers are not cut off, and 1,500 or more if you want HTTP headers.
- Start the capture before the connection you care about, since a missing handshake means no TLS server name and no TCP flags to interpret.
- Narrow a large capture with a capture filter when recording; this page is fastest on files that hold only the traffic you need.
Frequently asked questions
Does the decoding match what tcpdump prints?
On a 12-packet capture of one HTTP exchange, the handshake and the request and response matched tcpdump -r line for line: sequence and acknowledgement numbers, window sizes, flags, the request line and the status line. The built-in example reads identically in tcpdump too, so a mismatch on your own file points to something unusual in the capture.
When would a HAR file be better than a capture?
A HAR file is what a browser exports after decrypting its own HTTPS traffic, so it holds full URLs, timings and bodies, and the HAR analyzer on this site reads it. A capture is the raw bytes on the wire, which gives you DNS, TCP behaviour and every protocol, but only the cleartext parts of encrypted ones.
Why is the Duration smaller than the time between the first and last packet I expected?
The duration is the last timestamp minus the first one in the file. A capture started late or stopped early has a shorter span than the activity you were watching.
Which filter syntax does it use?
A small subset in Wireshark's style: protocol names, comparisons on ip.addr, ip.src, ip.dst, port, tcp.port, udp.port, len, dns.qry.name, http.host, tls.sni and info, the word contains, quoted text search, and and, or, not with parentheses. Type one expression, not a list. Anything outside that gives an error that names the part it did not understand.
Can it show the contents of an HTTP response?
It shows the status line and headers such as Content-Type and Server, not the body. Use the CSV of HTTP messages to find the stream, then open the capture in a full dissector if you need the body.