novair Back to HAR Viewer
HAR ViewerHAR files

How to read a HAR file

A HAR file is the browser's Network tab saved as JSON: one entry per request, with its headers, body, response and timings. Here is what each part means, a real example, and how to find the requests that failed.

What is inside

HAR stands for HTTP Archive. The file is plain JSON with one top-level object, log, which holds the version of the format (1.2 for every current browser), the creator (WebInspector for Chrome and Edge) and an array of entries, one per request, in the order they started.

{
  "log": {
    "version": "1.2",
    "creator": { "name": "WebInspector", "version": "537.36" },
    "entries": [
      {
        "startedDateTime": "2026-09-12T10:00:05.000Z",
        "time": 320,
        "request": {
          "method": "GET",
          "url": "https://api.example.com/avatar.png",
          "headers": []
        },
        "response": {
          "status": 500,
          "statusText": "Internal Server Error",
          "headers": [],
          "content": { "size": 12, "mimeType": "image/png", "encoding": "base64", "text": "ZXlKaGJHY2lPaUpJVXpJMU5pSjk=" }
        }
      }
    ]
  }
}
  • request: method, URL, headers, cookies, query string and, for a POST, postData with the form fields or the JSON sent.
  • response: status, status text, headers, cookies and content, whose text holds the body (base64 when encoding says so).
  • time and timings: how long the request took, in milliseconds, and where the time went.
  • startedDateTime: when the request started, which gives the order of events.

A HAR file example, as a table

Reading raw JSON is slow: a ten-second session easily holds two hundred entries. The same four-request test file we use for HAR Viewer's tests reads like this once each entry is one row:

#  Method  Status  Host             Path                    Type              Size   Time
1  POST    200     api.example.com  /oauth/token            application/json  180 B  1500 ms
2  GET     200     app.example.com  /dashboard?tab=home&…   text/html          50 B  2400 ms
3  GET     500     api.example.com  /avatar.png             image/png          12 B   320 ms
4  GET     0                        not-a-url                                   0 B     0 ms

Row 1 is a login that returned tokens, row 2 a page whose URL carries an access_token, row 3 a server error and row 4 a request that never got an answer.

Finding the errors

  • Status 0: no response at all. The request was blocked (CORS, an ad blocker, a proxy), cancelled by the page, or the host could not be reached. It is often the most important row and is easy to miss in raw JSON.
  • 4xx: the server refused the request. 401 and 403 point to authentication or permissions, 404 to a wrong URL, 429 to rate limiting.
  • 5xx: the server or a gateway failed. 502, 503 and 504 usually mean a backend behind a proxy did not answer in time.
  • Slow requests: sort by time, then read the timings of the slowest one.

HAR Viewer's ticket report (Pro) lists exactly these: every request with status 0 or 400 and above, and every request at or above harViewer.slowRequestMs, 1000 ms by default. On the test file that gives 2 failed requests (rows 3 and 4) and 2 slow ones (rows 1 and 2).

Reading the timings

timings splits time into blocked, dns, connect, ssl, send, wait and receive, in milliseconds; -1 means the phase did not apply, for example dns on a connection that was reused. wait is the time between the end of the request and the first byte of the response: a long wait points to the server, a long receive to a large body or a slow network, a long blocked to too many requests to the same host at once.

Mistakes that make a HAR useless

  1. Opening DevTools after the problem: the requests that matter are not in the file. Open DevTools first, then reproduce.
  2. Forgetting “Preserve log”: a redirect or a login clears the list and the HAR starts after the error.
  3. Sending the raw file: it holds your session cookies and tokens. Sanitize it first.
  4. Renaming another JSON file to .har: without log.entries it is not a HAR file and no viewer can read it.
  5. Cutting the file by hand to make it smaller: the JSON breaks and the file can no longer be opened.

How to sanitize a HAR file before you send it

Frequently asked questions

How do I open a HAR file?

Any text editor shows the JSON, but a viewer is faster. Chrome and Edge DevTools can import a HAR into the Network panel, and in VS Code, HAR Viewer opens .har files as a table by default, with filters by URL and by status.

What does status 0 mean in a HAR file?

The browser got no response: the request was blocked, cancelled or could not reach the host. Look at the request URL and at the console of the page at the same moment; CORS and ad blockers are the usual causes.

How do I read a HAR file for errors?

Filter on status 0 and on 400 and above, then sort by time for the slow ones. For each failed request, read the response body: most APIs explain the error there.

Check your own HAR file the same way

HAR Viewer & Sanitizer for VS Code opens your capture as a request table, counts every secret it holds and writes a copy without cookies and authentication headers, on your machine. Free, no account; Pro also clears URLs, form fields and bodies, applies your own rules, sanitizes whole folders, compares two captures and writes a ticket report.