Two everyday capture edits are shortening every frame to a snaplen (editcap -s or tcpdump -s) and cutting a file into smaller pieces (editcap -c for a packet count, editcap -r to keep a range). Pcap Workbench Web Community 1.8.10 does both from the Recipes tab in the browser. The eight-packet teaching file below is small enough that the Community 10-packet write cap does not get in the way. This article walks through those two recipes and a split by time interval (editcap -i), then compares every output file with editcap 4.4.
You need version 1.8.10 or later. In 1.8.9, Truncate wrote the cut length as the original packet length (so Wireshark showed [Malformed Packet]), and Split by time interval started each window at the first packet of the part, which gave fewer parts than editcap.
Try it yourself in the browser Download the input PCAP
What is in the file
truncate-split-input.pcap is an Ethernet capture in the documentation prefix 192.0.2.0/24: two ICMP echoes, a DNS lookup for testhost.lab.example, then the same pattern again for otherhost.lab.example. The ICMP frames are 62 bytes; the DNS frames are 80, 116, 81 and 118 bytes. Timestamps start at 0 and fall into three clusters (0.000–0.011, 0.100–0.101, 0.200–0.201).
| No. | Time (s) | Protocol | Length | Content |
|---|---|---|---|---|
| 1 | 0.000 | ICMP | 62 | Echo request, 192.0.2.10 → 192.0.2.20, seq 1 |
| 2 | 0.001 | ICMP | 62 | Echo reply, seq 1 |
| 3 | 0.010 | DNS | 80 | Query 0x1234 A testhost.lab.example |
| 4 | 0.011 | DNS | 116 | Response 0x1234, A 192.0.2.30 |
| 5 | 0.100 | ICMP | 62 | Echo request, seq 2 |
| 6 | 0.101 | ICMP | 62 | Echo reply, seq 2 |
| 7 | 0.200 | DNS | 81 | Query 0x2345 A otherhost.lab.example |
| 8 | 0.201 | DNS | 118 | Response 0x2345, A 192.0.2.40 |
tshark 4.4 reports no expert warnings on this file, and the IP and UDP checksums verify as good. The web edition ships no demo captures, so this is the file the article publishes.
Try it yourself: truncate to 64 bytes
These steps were run on Web Community 1.8.10, the version of the page at packetbuilder.net/pcap-workbench-web/.
- Open the page and wait until the status at the bottom right says Ready. The badge in the top right should read Web Community 1.8.10 (or later).
- In the Packet editor tab, click Open capture and choose
truncate-split-input.pcap. The summary should read8 of 8 packets shown. The list shows the four ICMP rows at length 62 and the four DNS rows at 80, 116, 81 and 118.

- Open Recipes (the Recipes button in the toolbar, or the PCAP tools tab, which starts on the Recipes subtab). The hint on that page says tools are chained as a recipe and that each step writes an intermediate capture that the next step reads.
- In the tool list, select Truncate (snaplen) and click + Add step. The step defaults to Max bytes to keep
64and PacketsAll relevant packets. The help under the snaplen field says packets already at or under that length are left unchanged. Leave those defaults. - Click the blue Run recipe button. Recipes use the capture that is open in the Packet editor; if none is open, the page asks you to open one first.
The Result panel should show exit code 0 and a Download out.pcap link. The stdout is JSON from the Community runner. In this run it reported packets_in 8, packets_processed 8, community_limited false, a step result of truncated packets: 4, and packets_out 8.

Open the downloaded file — or the published copy truncate-split-snaplen64.pcap — in the Packet editor. The summary is still 8 of 8 packets shown, but the four DNS rows now have Length 64. The ICMP rows stay 62. Select DNS packet 4: Packet view ends after the first label of the query name (testhost), while Protocol view still shows ip.len 102 and udp.length 82, the values from before the cut. That staleness is intentional: the tool help says checksums and lengths are left as-is. What does change is the record header: each cut packet stores 64 bytes but keeps its original on-wire length (116 for packet 4), as a real snaplen-limited capture does.

How this compares with editcap -s
The Workbench output is byte-for-byte the same file as editcap -F pcap -s 64 on this input, including the file header and every record header. The pcap file header declares a snaplen of 64. Each cut record has incl_len 64 and keeps orig_len at the original length (80, 116, 81 and 118). tshark therefore reports frame.len 116 and frame.cap_len 64 for packet 4, and the Info column says [Packet size limited during capture]. There are no expert warnings: Wireshark knows the bytes are missing because of the snaplen, not because the packet is broken. The PCAPNG output (truncate-split-snaplen64.pcapng) also matches editcap -s 64 on the PCAPNG input byte for byte. There, the original length is kept in each Enhanced Packet Block.
tshark -r truncate-split-snaplen64.pcap -T fields -e frame.number -e frame.len -e frame.cap_len -e ip.len -e _ws.col.Info
cmp truncate-split-snaplen64.pcap editcap-s64.pcap # no output: identical
Try it yourself: split by packet count
Open the original input file again in the Packet editor (not the truncated output). On the Recipes tab, Remove the Truncate step if it is still there, select Split capture, and click + Add step.
Set Split by to Packet count (the default) and Threshold to 3. Leave Range from at 1 and Range to at 0; those fields are for the range modes, described below. Click Run recipe.
The Result panel should again show exit code 0. The step result in this run was 3 part(s) written, 8 packet(s) total. Four download links appeared: Download out.pcap, out_part1.pcap, out_part2.pcap, and out_part3.pcap. out.pcap is a copy of part 1, which is why the JSON also reports packets_out 3. Use the _partN files if you want every piece:
truncate-split-part1.pcap— packets 1–3 (ICMP, ICMP, DNS query), 3 framestruncate-split-part2.pcap— packets 4–6 (DNS response, ICMP, ICMP), 3 framestruncate-split-part3.pcap— packets 7–8 (the second DNS exchange), 2 frames
Each part renumbers its packets from 1 and keeps the original timestamps. Each part is byte-for-byte the same file as the matching piece of editcap -F pcap -c 3 on this input. editcap 4.4 names the pieces with a numeric suffix and a timestamp (_00000_…, _00001_…, _00002_…) instead of _partN.

Once you have the published parts, you can open any two of them in the Compare tab — for example your downloaded out_part1.pcap against the published part 1 — to confirm they are the same.
Other Split by modes
The Split by list also offers File size (bytes), Time interval (s), Packet range, and Time range (s). The help under the field says the first three chunk modes write sequential <base>_partN files, and that the two range modes write one slice, from Range from to Range to, into the single output path (0 means “to the end”).
Packet range 3 to 6 on this file writes four packets (the first DNS exchange and the second ICMP echo), with the message 4 of 8 packet(s) written (original packets 3-6). The file is byte-for-byte the same as editcap -F pcap -r infile outfile 3-6. A copy is published as truncate-split-range-3-6.pcap.
Try it yourself: split by time interval
Open the original input again, replace the recipe step with Split capture, set Split by to Time interval (s) and Threshold to 0.05, and click Run recipe. The step result reads 5 part(s) written, 8 packet(s) total, and the Result panel lists out.pcap plus out_part1.pcap to out_part5.pcap.

The windows work the same way as in editcap -i. They form a fixed grid that starts at the first packet's time: 0–0.05 s, then 0.05–0.10 s, 0.10–0.15 s and so on. A packet exactly on a boundary stays in the earlier window. On this file the parts hold 4, 1, 1, 1 and 1 packets:
truncate-split-time-part1.pcap: packets 1–4 (0.000–0.011 s)truncate-split-time-part2.pcap: packet 5 (0.100 s, exactly on the 0.10 boundary, so it closes the 0.05–0.10 window)truncate-split-time-part3.pcap: packet 6 (0.101 s)truncate-split-time-part4.pcap: packet 7 (0.200 s, on the 0.20 boundary)truncate-split-time-part5.pcap: packet 8 (0.201 s)
editcap -F pcap -i 0.05 on the same input writes five files, and each one is byte-for-byte the same as the matching part. There is one deliberate difference. When a whole interval has no packets, editcap still writes an empty file for it, while Workbench writes no part. On a capture with gaps, Workbench part numbers can therefore be lower than editcap's file numbers, but the packets in each non-empty part are the same. This teaching file has no empty interval at 0.05 s.
File size (bytes) with threshold 200 produced four parts; the threshold counts the sum of frame bytes, not the size of the pcap file on disk. The editcap 4.4.19 build used for this article has -c and -i but no file-size split flag, so that mode was not compared.
Editions and limits
Recipes that write a capture are subject to the Community 10-packet write cap. This teaching file has eight packets, so the runner reported community_limited: false and processed the whole file. On a larger input, Community sees only the first 10 packets of each writing step. Compare, by contrast, is read-only and is not capped that way; see How to Compare Two PCAP Files.
This walk-through was verified in Web Community 1.8.10. The same recipe tools are in the desktop app. The desktop 1.8.10 build was checked from its command line (--run-recipe) for Truncate 64 and Time interval 0.05, and gave the same bytes as editcap; the desktop window itself was not used here.
Related
Companion article: How to Compare Two PCAP Files — open the published snaplen or part files next to your own recipe output and confirm they match.
Other Pcap Workbench guides in this series:
- How to Rewrite IP and MAC Addresses for a Lab
- How to Inspect IP Fragmentation and Reassembly
- How to Impair a PCAP (Drop, Reorder, Delay or Corrupt Packets)
Earlier articles on related workflows: edit a PCAP without breaking checksums (the inverse of a snaplen test, which leaves lengths and checksums stale on purpose), anonymize a PCAP before you share it, build a PCAP regression set with PASS/FAIL checks, and strip VLAN tags or decapsulate GTP-U.
Try it yourself in the browser Input PCAP Snaplen 64 Input PCAPNG
Addresses in these files (192.0.2.10, 192.0.2.20, 192.0.2.30, 192.0.2.40, 192.0.2.53) are documentation-range IPv4 addresses from RFC 5737, not a live network. MAC addresses are locally administered. A PCAPNG copy of the input and of the snaplen-64 output is available alongside the PCAPs. Product page: Pcap Workbench.