har filenetwork debuggingbrowser devtoolsperformancehttpdeveloper tools

How to Analyze HAR Files to Debug Network Issues

Learn how to read HTTP Archive (HAR) files exported from browser DevTools to diagnose slow pages, failed requests, and API errors.

9 min read

Related Tool

HAR File Viewer

Open tool

When a web page is slow, an API request fails, or a third-party script behaves unexpectedly, your first instinct is to open browser DevTools and look at the Network tab. You scroll through requests, filter by type, click individual entries. But what if you need to share this network trace with a colleague, or compare two traces side by side, or analyze hundreds of requests programmatically?

That is what HAR files are for. A HAR (HTTP Archive) file captures a complete network trace from your browser and saves it as JSON. A HAR viewer lets you open and analyze that file outside of DevTools.

What is a HAR File?

A HAR file is a JSON document conforming to the HAR 1.2 specification. It contains:

  • log.entries — an array of every network request made during the capture
  • For each entry:

- startedDateTime — when the request started (ISO 8601)

- time — total time in milliseconds

- request — method, URL, headers, cookies, body

- response — status, headers, cookies, body content

- timings — DNS, connect, SSL handshake, send, wait, receive breakdown

- serverIPAddress — the IP the request was made to

- cache — cache hit/miss information

How to Export a HAR File

Chrome / Edge:

1. Open DevTools (F12)

2. Click the Network tab

3. Reproduce the issue you want to capture

4. Right-click in the request list → Save all as HAR with content

Firefox:

1. Open DevTools (F12)

2. Click the Network tab

3. Click the gear icon → Save All As HAR

Safari:

1. Open the Web Inspector

2. Click the Network tab

3. Hold Shift and click the Export button

Using the DevHexLab HAR Viewer

Upload your HAR file or paste the JSON content. The viewer renders a sortable, filterable table of all requests with key metrics visible at a glance.

Filtering requests

Filter by:

  • URL substring — find all requests to a specific domain or endpoint
  • Status code — filter for errors (4xx, 5xx) or successful responses (2xx)
  • Method — show only POST requests
  • Content type — filter for XHR/fetch calls, scripts, stylesheets, images

Timing waterfall

The timing waterfall shows each request as a horizontal bar positioned on a timeline. This makes it easy to see:

  • Sequential requests — requests that cannot start until a previous one finishes
  • Parallel requests — requests that run at the same time
  • Long gaps — time where the browser is idle between requests (often blocked on DNS or connection setup)

Request detail

Click any request to see the full detail:

  • Request headers and body
  • Response headers and body (if the HAR was captured with content)
  • Timing breakdown: DNS lookup, TCP connect, TLS handshake, time to first byte (TTFB), content download

Summary metrics

The viewer calculates aggregate metrics:

  • Total number of requests
  • Total transfer size
  • Total time from first request to last response
  • Slowest requests ranked by total time
  • Most error-prone endpoints ranked by 4xx/5xx count

Common Debugging Scenarios

Finding slow API calls

Sort by time descending. The slowest requests appear at the top. Click each to see whether the time is in the server response (TTFB) or in the content download. High TTFB indicates a slow server or database query. High download time indicates a large response payload.

Finding failed requests

Filter by status 4xx and 5xx. Check the response body of each failed request for error messages from the server. These often explain the root cause more clearly than the status code alone.

Diagnosing CORS errors

CORS issues appear as OPTIONS preflight requests followed by a blocked request. Look for OPTIONS requests returning non-200 status, or fetch requests that failed with no response (blocked by the browser before the server was reached).

Comparing two traces

Export a HAR before and after a performance change. Open each in the viewer and compare total load times, number of requests, and largest assets.

Conclusion

HAR files are one of the most useful tools in a web developer's debugging toolkit. They capture the complete network behavior of a page session in a shareable, portable format. The DevHexLab HAR viewer lets you analyze these files with powerful filtering and the timing waterfall without needing to share access to a production system.