Four ways to read a .warc, .warc.gz or .wacz β in the browser, with Python, or from the command line
A WARC file is not a document you open the way you open a PDF. It is a recording of network traffic: a concatenation of records, each holding one HTTP request or response with its headers and body, exactly as it crossed the wire. One WARC can hold a single page or an entire site, with every image, stylesheet and script stored alongside the HTML.
That is why double-clicking one does nothing useful, and why unzipping it is usually the wrong instinct. What you want is a reader that understands records β either to browse the captures, or to replay the pages as they were served.
You will meet three extensions. They are the same content in different wrappers:
.warc.gz archives plus an index. Produced by Webrecorder tools.Do not rename a .warc.gz to .gz and decompress it. It will often appear to work and give you one valid record followed by silence, because most gzip tools stop at the end of the first member. Use a reader that understands record-level compression.
Best for: checking what is inside an archive, reading a few pages, inspecting response headers, or working on a machine where you cannot install anything.
The M4cgyvers WARC viewer opens .warc, .warc.gz and .wacz files directly in the browser. Choose the file, press Process Locally, and you get every captured URL grouped by site, with any page replayable from its captured response.
Parsing runs in Web Workers on your own machine and the archive is read as a stream, so multi-gigabyte files do not have to fit in memory. The file is not uploaded.
ReplayWeb.page, by Webrecorder, is the other browser-based option and also runs locally. It is built around high-fidelity replay β browsing an archived site as a site β and is the reference implementation for WACZ. If your goal is to navigate a captured site rather than inspect its records, try it.
Best for: extracting data, scripting, filtering a large archive, or anything you need to repeat.
warcio is the standard Python library. It streams records, so archive size is not a constraint, and it reads .warc and .warc.gz without a separate decompression step.
pip install warcio
# List every captured URL and its status code
python - <<'PY'
from warcio.archiveiterator import ArchiveIterator
with open("archive.warc.gz", "rb") as stream:
for record in ArchiveIterator(stream):
if record.rec_type == "response":
url = record.rec_headers.get_header("WARC-Target-URI")
status = record.http_headers.get_statuscode()
print(status, url)
PYThere is also a command-line side to it β warcio index and warcio check are useful for a quick look at an archive's contents and for verifying it is not truncated.
pywb is the replay system behind several large archives. It indexes your WARCs and serves them as a local Wayback-style site, which is what you want for a collection you will browse repeatedly rather than inspect once.
pip install pywb wb-manager init mycollection wb-manager add mycollection archive.warc.gz wayback # then open http://localhost:8080/
Best for: a quick look, or confirming a file is what you think it is.
An uncompressed .warc is plain text at the record boundaries, so the ordinary tools work:
# The first few record headers head -c 2000 archive.warc # Every captured URL grep -a '^WARC-Target-URI:' archive.warc # How many response records grep -ac '^WARC-Type: response' archive.warc
For a .warc.gz, zcat will decompress the whole stream β which works for reading, but throws away the per-record structure that makes random access possible:
zcat archive.warc.gz | grep -a '^WARC-Target-URI:' | head
A .wacz is a ZIP, so unzip -l archive.wacz will list the .warc.gz archives inside it.
| If you want to⦠| Use |
|---|---|
| See what is inside an archive, quickly | WARC viewer (browser) |
| Read the HTTP headers of a capture | WARC viewer (browser) |
| Browse a captured site like a site | ReplayWeb.page, or pywb |
| Extract files or data in bulk | Python + warcio |
| Serve a collection to other people | pywb |
| Confirm a file is a valid WARC | warcio check |
Yes. The WARC viewer and ReplayWeb.page both run in the browser. Note the distinction worth checking on any such tool: both of these parse the file locally, whereas some βonline WARC viewerβ sites upload your archive to their server and cap the size.
No, and you should not. Every tool above reads it compressed. Decompressing it by hand usually yields only the first record.
Usually the record-compression problem above, or a crawl that captured a single page. Run warcio check, or open it in the viewer, which reports how many records it found.
Yes β the browser tools need nothing installed at all. Python is only needed for scripted extraction.
Not by itself. Chrome has no WARC support; it will download or show raw bytes. A browser-based viewer is JavaScript doing the parsing, not the browser.
wget --mirror --page-requisites --warc-file=site https://example.com/ writes site.warc.gz as it crawls. In a browser, the ArchiveWeb.page extension records what you visit and saves a .wacz.