Security operations
How to View PCAP Files Without Wireshark: tcpdump, tshark and Browser Methods
How to view, open and read a PCAP file without Wireshark: in the browser, with tcpdump or tshark, plus filters, a triage checklist and safe sharing tips.
To view a PCAP file without Wireshark, open it in a browser-based PCAP viewer, print it with tcpdump -r, or export fields with tshark. All three read the same libpcap and PCAPNG formats, and two of them are already on most Linux and macOS machines. This guide shows how to open a PCAP file each way, how to read what you see, and what to check first during an incident.
I triage captures on locked-down laptops and jump hosts where installing Wireshark is not allowed, so these are the methods I actually use. Every command below was run against the sample capture in the PCAP & HAR Analyzer. Its tcpdump view prints byte-identical output to tcpdump -nn -vv -X, checked on a 5,407-packet capture as well as the sample.
What is inside a PCAP file?
A PCAP file is a 24-byte global header followed by one record per packet, and each record holds a timestamp, the captured length, the original length and the raw frame bytes.
The global header starts with a magic number that tells readers the byte order and timestamp resolution. Wireshark saves the newer PCAPNG format by default, which wraps packets in blocks and can hold several interfaces. Every method in this guide reads both.
| First bytes | Format | Timestamps |
|---|---|---|
| d4 c3 b2 a1 | libpcap, little-endian | microseconds |
| 4d 3c b2 a1 | libpcap, little-endian | nanoseconds |
| a1 b2 c3 d4 | libpcap, big-endian | microseconds |
| 0a 0d 0d 0a | PCAPNG section header | per interface (if_tsresol) |
xxd -l 4 capture.pcap
# 00000000: d4c3 b2a1 -> classic pcap, little-endian, microseconds
file capture.pcapWhy does a PCAPNG file show several link types?
A PCAPNG file can hold many interfaces, each described by its own Interface Description Block with its own link type and timestamp resolution, so one file can mix Ethernet, Linux cooked and loopback frames.
Every packet block in a PCAPNG file carries an interface ID, and that ID points to an Interface Description Block (IDB) earlier in the same section. The IDB states the link type, which tells a reader what the first bytes of each frame are, and an optional if_tsresol value that sets the timestamp unit. A capture taken with tcpdump -i any, a merge made with mergecap, or a capture from a router with several ports will all contain more than one interface.
| Link type | Name | Where you see it |
|---|---|---|
| 1 | Ethernet (with 802.1Q / QinQ VLAN tags) | Wired and most Wi-Fi captures after the driver strips 802.11 headers |
| 101 / 12 | Raw IP | VPN tunnels (tun0, WireGuard) where there is no link header |
| 113 | Linux cooked capture (SLL) | Older tcpdump -i any captures: a 16-byte pseudo-header |
| 276 | Linux cooked capture v2 (SLL2) | tcpdump -i any on libpcap 1.10 and later: a 20-byte pseudo-header |
| 0 / 108 | BSD / OpenBSD loopback | macOS lo0 and BSD loopback: a 4-byte address family |
| 177 / 197 | Linux LAPD / Endace ERF | ISDN signalling and capture-card exports; rare outside telecoms |
The PCAP viewer maps each packet to its own interface and shows one badge per link type with its packet count. Frames on the six common link types above are decoded down to IP, TCP, UDP, DNS, TLS and HTTP. Exotic link types are still listed with their timestamps and lengths, and they carry a "not decoded" badge, so you can see at a glance which part of a merged file needs Wireshark.
# Interface list with link types (ships with Wireshark)
capinfos -I capture.pcapng
# Packet count per interface
tshark -r capture.pcapng -T fields -e frame.interface_id | sort | uniq -cHow do you view a PCAP file in the browser?
Drop the file into a client-side PCAP viewer: the packet list, protocol statistics and a byte decoder appear in the tab, and the capture is never uploaded.
- Open the online PCAP viewer and drop your
.pcapor.pcapngfile, or press Load sample data. - Type a display filter such as
dns,port 443,host 10.0.0.5or!arpto narrow the list. - Select a row to open it in the packet decoder, which highlights each header field's bytes.
- Switch to the packet analysis dashboard for top talkers, conversations and the port matrix.
Check the privacy claim of any online viewer before you use it. Many upload the capture to a server for processing, which defeats the point when the capture holds credentials. A client-side viewer parses the bytes with JavaScript in your tab; your browser's network panel stays empty while it works.
How do you read a PCAP file with tcpdump?
Run tcpdump -nn -r capture.pcap to print one line per packet, add -vv for IP and transport details, and add -X to see each packet in hex and ASCII.
| Flag | Effect |
|---|---|
| -r file | Read packets from a file instead of an interface |
| -nn | Do not resolve host names or port names (fast, no DNS leaks) |
| -v / -vv | Print TTL, IP ID, flags, checksums and protocol details |
| -X / -XX | Hex and ASCII dump without / with the link-layer header |
| -tttt | Print full date and time on every line |
| -c N | Stop after N packets |
tcpdump -nn -r capture.pcap | head -50
tcpdump -nn -vv -r capture.pcap "tcp port 80"
TZ=UTC tcpdump -nn -vv -X -r capture.pcap -c 5tcpdump prints timestamps in the machine's local time zone, so prefix TZ=UTC when you compare captures from different hosts. To get the same text without a terminal, use the PCAP to tcpdump output view, which also parses tcpdump text pasted from a server.
How do you read a line of tcpdump output?
Each tcpdump line reads left to right as time, protocol, source address and port, destination address and port, TCP flags, sequence and acknowledgement numbers, window size and payload length.
09:26:53.021500 IP (tos 0x0, ttl 64, id 602, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.100.50740 > 203.0.113.10.80: Flags [.], cksum 0xf7e9 (correct), seq 1, ack 1, win 64240, length 0- First line (-v): the IPv4 header.
ttlhints at the sender's operating system (64 for Linux and macOS, 128 for Windows),flags [DF]means "do not fragment", andlengthis the whole IP packet. - Addresses:
192.168.1.100.50740is host 192.168.1.100 on port 50740. tcpdump joins address and port with a dot, so IPv4 addresses show five numbers. - Flags:
Sis SYN,.is ACK,Pis PUSH,Fis FIN andRis RST.[S.]is a SYN-ACK; a burst of[S]lines with no replies is a port scan. - seq and ack: after the handshake tcpdump prints relative numbers, so the first data byte is 1. Add
-Swhen you need the absolute values to match another tool. - win and length: the receive window and the TCP payload size. Many
length 0lines are plain acknowledgements.
Segments on port 80 that continue an HTTP response end with : HTTP and no headers, because only the first segment of a response holds the status line. The tcpdump output view shows 200 packets per page and rebuilds tcpdump's per-connection sequence state from the start of the file for each page. Page 20 therefore prints exactly what tcpdump -nn -vv -X prints for packets 3,801 to 4,000.
How do you export PCAP fields with tshark?
Use tshark -r capture.pcap -T fields -e <field> to pull specific columns, such as DNS query names or TLS server names, into text you can sort and count.
# Every DNS name queried, most frequent first
tshark -r capture.pcap -Y "dns.flags.response == 0" -T fields -e dns.qry.name | sort | uniq -c | sort -rn
# TLS server names (SNI) from Client Hellos
tshark -r capture.pcap -Y "tls.handshake.type == 1" -T fields -e ip.src -e tls.handshake.extensions_server_name
# Conversation statistics
tshark -r capture.pcap -q -z conv,tcptshark ships with Wireshark, so it is only an option where Wireshark's command-line tools are installed. It is the best choice for scripted, repeatable extraction across many captures.
What should you check first in a PCAP file?
Start with statistics, not single packets: look at the protocol mix, the top talkers, every DNS name queried and any cleartext credentials before reading individual frames.
- Protocol hierarchy: unexpected protocols, such as SMB or Telnet on a user segment, deserve attention.
- Top talkers and conversations: large transfers to unfamiliar external hosts can mean exfiltration.
- DNS names: long random-looking subdomains suggest DNS tunneling; regular intervals suggest beaconing.
- Cleartext secrets: HTTP
Authorizationheaders, FTPPASScommands and Telnet sessions expose passwords. - TLS versions: a Client Hello that offers only TLS 1.0 or 1.1 points to an outdated client or a downgrade.
The automated triage view runs these checks as documented rules and cites the frames behind each finding. Pull the public indicators it surfaces into the IOC Extractor, then hunt for them across your fleet with the KQL & SPL builder.
How do you open a very large PCAP file?
Split it into smaller files with editcap -c or tcpdump -C, or filter it down to the traffic you need before opening it.
# 500,000 packets per output file
editcap -c 500000 big.pcapng part.pcapng
# Keep only traffic to or from one host
tcpdump -nn -r big.pcap -w host.pcap host 10.20.4.17
# Rotate files every 100 MB while capturing
sudo tcpdump -i eth0 -C 100 -w rolling.pcapBrowser viewers hold the file in memory, so stay under about 1.5 GB per file. The LocalSecTools viewer reads the first 250,000 packets of a larger capture and says so in a warning banner, and every table pages 100 rows at a time so scrolling stays smooth. Wireshark struggles well before 1.5 GB on modest laptops too, which makes splitting good practice for any tool.
How do you create a PCAP file in the first place?
Capture with tcpdump -w on Linux or macOS, with pktmon on Windows, or export from Wireshark, then open the file with any of the methods above.
# Linux / macOS: whole frames, one interface, stop after 10,000 packets
sudo tcpdump -i eth0 -s 0 -c 10000 -w capture.pcap
# Only DNS and HTTPS, to keep the file small
sudo tcpdump -i any -w web.pcap "port 53 or port 443"
# Windows 10/11, built in: capture, then convert to PCAPNG
pktmon start --capture --pkt-size 0 -f trace.etl
pktmon stop
pktmon etl2pcap trace.etl -o capture.pcapngCapture as close to the problem as you can: on the affected host, or on a span port in front of it. A capture filter such as host 10.20.4.17 keeps files small enough to share. Note that captures taken on the sending host often show incorrect TCP checksums, because the network card fills them in after the capture point; that is checksum offloading, not corruption.
Frequently asked questions
Open it in a PCAP viewer: a browser-based one such as the LocalSecTools PCAP viewer, Wireshark, or tcpdump -nn -r capture.pcap in a terminal.
Try it in your browser
- PCAP & HAR AnalyzerOpen PCAP, PCAPNG, HAR and EVTX files in the browser: packet table, decoder, tcpdump output, HAR sanitizer and triage.
- IOC ExtractorExtract and defang indicators of compromise from reports and logs, then export CSV or JSON.
- KQL & SPL Query BuilderBuild Sentinel KQL and Splunk SPL from visual filters, with 25 SOC hunting presets.
About the author: Asad Ali
IT Support Engineer and SOC analyst · Microsoft SC-200 & ISC2 CC certified
Asad Ali is an IT Support Engineer and SOC analyst with a Computer Science degree from UET Lahore. He holds the Microsoft SC-200 Security Operations Analyst and ISC2 Certified in Cybersecurity (CC) certifications, works on threat detection, network analysis and Linux administration, and builds and maintains every tool on LocalSecTools.
- Microsoft Certified: Security Operations Analyst (SC-200)
- ISC2 Certified in Cybersecurity (CC)
Every guide is written and technically reviewed by Asad Ali, and the commands and numbers are checked against the LocalSecTools calculators. Read more about his work at asadali.tech.