Skip to main content

HAR file

Concept/General

Also known as HTTP Archive, .har

A HAR (HTTP Archive) file is a JSON-formatted recording of HTTP requests and responses, including headers, cookies, bodies and timing. In request-based scraping it is used to compare what your code sends with what a real browser sends.

How to recognize it

How to recognize it
File
.har
Tools
A wire-level recording proxy such as powhttp; DevTools and Charles exports normalize header order and case

What is inside a HAR file

A HAR file is plain JSON, saved with a .har extension. Everything sits under one log object:

  • version and creator: the HAR format version and the tool that wrote the file. Most tools write version 1.2.
  • pages: the pages that were open during the recording.
  • entries: one entry per request. Each entry holds the request (method, URL, HTTP version, headers, cookies, query string and body), the response (status, headers, cookies and usually the content), the timings for each phase of the request, and the server IP address.

Because it is ordinary JSON, a HAR file can be opened in powhttp or any HAR viewer, read by an analyzer, or searched with your own scripts.

How to record one

Always record with a proxy that captures the wire, such as powhttp, for both the browser and your script. Do not record with browser DevTools. DevTools shows a cleaned-up view of each request: it re-sorts headers, normalizes their case and never shows the TLS handshake, which are exactly the signals anti-bots read. The powhttp guide explains why DevTools is not enough in detail.

From a browser. Route only the browser through powhttp, for example with a per-browser proxy extension, reproduce the steps and export the session as HAR. Avoid the system-proxy setting, which fills the session with traffic from every other app.

From your own script. Point your client at the powhttp proxy port (8080 by default) and export the session the same way.

For debugging a scraper you want both: one recording of the real browser and one of your script, made against the same site.

What to remove before you share it

A HAR file from a logged-in session contains everything needed to take that session over. Before sending one to anyone, remove or replace:

  • cookies, including Set-Cookie headers in responses;
  • Authorization headers, bearer tokens and API keys;
  • session tokens in URLs, request bodies and responses;
  • passwords and personal data in form posts.

Replace values instead of deleting the fields, so the structure of the requests stays readable.

Using a HAR file to debug a scraper

Put the browser recording and your script's recording side by side and compare them request by request:

  • The sequence: which requests the browser makes before the one that fails, including background calls to anti-bot endpoints.
  • The headers: names, values, letter case and order.
  • The cookies: which cookie each request carries and where its value first appeared.
  • The bodies: what is posted to challenge endpoints and what comes back.
  • The dynamic values: search the browser recording for a token to find the response that issued it.

Repeat until the two recordings no longer differ. Most remaining blocks after that come from the layers a HAR file cannot show.

What a HAR file does not show

  • The TLS handshake. The HAR format has no field for the ClientHello, so it cannot tell you whether your TLS fingerprint matches Chrome's. Check that separately.
  • The real header order, if the wrong tool recorded it. A HAR exported from DevTools or Charles normalizes header order and case and often drops HTTP/2 pseudo-headers, so it is not a reliable source for header order. A powhttp HAR keeps the order and case that went out on the wire.
  • A clean fingerprint, if the proxy changes it. A recording proxy decrypts TLS by opening its own connection to the site. Charles uses its own handshake for that, so the site sees Charles instead of your client. powhttp copies your client's handshake parameters, so the fingerprint barely changes.

The powhttp guide walks through recording, searching and diffing captures for request-based scraping. The Hyper Solutions Claude Code plugin bundles a HAR analyzer. It sends an exported HAR file to a hosted Hyper Solutions server, so you sign in with your Hyper Solutions account to use it.

Questions

What is a HAR file?

A HAR (HTTP Archive) file is a JSON recording of the HTTP requests and responses a browser or tool captured, with headers, cookies, bodies and timings. Developers use it to debug network problems and to compare a scraper's traffic with a real browser.

How do I get a HAR file?

Record it with a wire-level proxy such as powhttp: route the browser and your script through it, reproduce the steps and export the session as HAR. Avoid DevTools exports, which re-sort headers, normalize their case and leave out the TLS handshake.

How do I open a HAR file?

Open it in powhttp or a HAR viewer, or in any text editor, since it is JSON.

Is it safe to share a HAR file?

Only after removing sensitive data. A HAR file can contain cookies, authorization headers, tokens, passwords and personal data, which together are enough to take over a logged-in session.

Does a HAR file show my TLS fingerprint?

No. The HAR format has no field for the TLS handshake. Check your TLS fingerprint with a TLS echo service, and record traffic with a proxy that does not replace your handshake.

Further reading

Technical review: Hyper Solutions engineering, Nov 18, 2026