A HAR file is a structured record of browser network activity. This guide shows how to export one from DevTools, find failed requests, read timing and headers, compare API behavior, and safely prepare a capture for someone else to investigate.
Overview
HAR stands for HTTP Archive. A HAR file usually uses JSON to describe requests and responses made while a page loads or while you perform an action such as signing in, submitting a form, or opening a dashboard. It can contain URLs, methods, status codes, headers, cookies, response metadata, redirects, and timing information.
A HAR file is useful when a screenshot or browser console message does not explain the failure. For example, it can help distinguish between a server returning an error, a request being blocked by the browser, a redirect going to the wrong location, an API response arriving too slowly, and a frontend never sending the expected request at all. A HAR file viewer can make the archive easier to scan, but the file can also be inspected as JSON with a JSON formatter and validator.
Use a HAR capture as evidence, not as a complete explanation. It records what the browser observed during one session. It does not automatically prove what happened inside the server, database, queue, or third-party service.
What to track
1. Export a focused capture
Reproduce the issue in a clean, repeatable way before exporting the file. Open the browser's Developer Tools, select the Network panel, and enable recording if it is not already active. Clear the existing entries, reproduce the problem once, and then stop or preserve the capture.
In Chrome and Chromium-based browsers, use the Network panel's export control, commonly labelled Export HAR or Save all as HAR with content. Microsoft Edge uses a similar Network-panel workflow. In Firefox, use the Network Monitor's save or export option for a HAR archive. Labels can vary by browser version, so look for an export or save control within the Network tool.
Before reproducing the issue, consider enabling Preserve log if the page navigates or redirects and you need to retain requests from the previous document. Use the filter box and request-type filters to narrow the display after capture. A focused HAR is usually easier to review than a recording that includes unrelated tabs, extensions, analytics calls, and repeated retries.
2. Find the request that matters
Start with the request associated with the visible symptom. For a failed API call, search by a distinctive path, endpoint fragment, or response status. For a page that does not load, inspect the document request first, then look at scripts, stylesheets, fonts, images, and data requests that failed afterward.
Check these fields in the request details:
- Request method: Confirm that the browser used GET, POST, PUT, PATCH, DELETE, or the method the API expects.
- Request URL: Look for the correct host, path, query parameters, protocol, and environment. A staging hostname or missing path segment can reveal a configuration problem.
- Status: Record the HTTP status and whether the request was cancelled, blocked, or completed.
- Request headers: Check content type, accepted response formats, origin-related headers, cache directives, and other headers relevant to the integration.
- Payload: For a form or API mutation, compare the submitted fields and JSON structure with the expected contract. Do not share secrets contained in the payload.
- Response headers and body: Look for an error message, content type, cache behavior, redirect location, or a response that is technically successful but not the data the frontend expects.
If the page uses client-side rendering, the important data may come from an API request rather than the initial HTML. This is also useful when deciding whether a workflow should inspect public JSON instead of scraping rendered markup; see how to find a website's public JSON data.
3. Read the timing breakdown
Timing details help locate delay, but their exact labels differ between browsers and HAR viewers. Common phases include queueing or blocking, DNS lookup, connection setup, TLS negotiation, request upload, server wait, and response download.
- A large queueing or blocking interval can indicate browser connection limits, prioritization, or work waiting behind other requests.
- A large DNS, connection, or TLS interval points toward name resolution, network reachability, or connection setup rather than application code.
- A large waiting or time-to-first-byte interval suggests that the server or an upstream dependency took time to begin responding. Treat this as a lead for server-side investigation, not proof of the exact cause.
- A large download interval can reflect response size, bandwidth, connection quality, or a slow transfer.
4. Compare requests rather than reviewing one in isolation
When possible, capture a working request and a failing request using the same browser and account. Compare the URL, method, query parameters, payload, cookies, authorization state, response status, and timing phases. A side-by-side comparison often exposes a missing header, different identifier, expired session, unexpected redirect, or environment-specific hostname faster than reading a single entry.
For authentication-related debugging, a HAR can show that a token or session cookie was absent or rejected, but it should not be treated as a safe place to publish credentials. If you need to inspect a token's non-secret claims, use a controlled workflow such as the guidance in JWT Decoder Online: How to Inspect Claims Safely.
| Pattern in the HAR | Useful next check |
|---|---|
| 404 Not Found | Verify the URL path, deployment version, route, and identifier. Check whether the frontend is calling an outdated endpoint. |
| 401 Unauthorized | Check whether credentials, a session, or an access token were sent and whether the request was made in the expected account context. |
| 403 Forbidden | Check permissions, origin or security controls, required headers, and whether the resource is restricted to a different role or environment. |
| 429 Too Many Requests | Inspect repeated calls, retry behavior, request frequency, and any available response guidance. Avoid increasing request volume while testing. |
| 5xx response | Record the endpoint, timestamp, request identifier if present, response body, and whether the error is repeatable. The server logs are usually needed next. |
| No request appears | Check frontend conditions, event handlers, validation, filters, service workers, and whether the action was actually triggered. |
| Long wait with no useful response | Separate connection setup from server wait and download time. Repeat with a clean capture and compare a known working request. |
Cadence and checkpoints
HAR analysis is most valuable when it becomes a repeatable debugging checkpoint rather than a one-time file export. For a recurring page-load or API issue, keep a small comparison record with the capture date, browser and version, operating system, environment, account role, action performed, and the request or requests under review.
Use a practical cadence:
- During an incident: capture immediately before changing configuration, retry logic, frontend code, or deployment state.
- After a fix: repeat the same steps and compare the failing request with the new result. Record whether the status, response, and timing changed.
- Monthly or quarterly: review recurring captures for endpoint changes, redirect chains, increasing response waits, duplicated requests, and failures concentrated in one browser or environment.
- After a browser or frontend change: repeat important workflows when DevTools behavior, authentication flows, service workers, routing, or client-side data fetching changes.
Do not treat a single fast capture as proof that a performance issue is resolved. Network conditions, cache state, account data, and backend load can vary. Preserve the conditions of the test and note what changed between captures.
How to interpret changes
Interpret differences in context. A status-code change from an error to success is meaningful, but it may conceal a new problem if the response body changed shape or the browser received an HTML login page where it expected JSON. Validate both the status and the content type, then inspect the response body when it is safe to do so.
A changed URL can indicate a deployment or routing change, while a changed request payload may point to frontend state, form serialization, or a contract mismatch. A new redirect can be intentional, but repeated redirects or a redirect to an authentication page often deserves investigation. If only one browser shows the problem, compare request headers, cookie handling, cached assets, service-worker behavior, and the exact reproduction steps before assuming the server is at fault.
For frontend scraping and automation workflows, a HAR can also reveal whether the page depends on a delayed API call, pagination request, or interaction-triggered endpoint. Pair the capture with a maintained selector strategy using the guidance in CSS selectors for web scraping, or compare a browser-driven workflow with the approaches discussed in BeautifulSoup versus Playwright.
Prepare a reproducible bug report
- State the expected result and the observed result.
- List the exact URL, action sequence, environment, browser, and account role.
- Include the time of the capture and a short description of what was cleared or preserved.
- Identify the relevant request by method, host, path, status, and approximate order in the capture.
- Attach the redacted HAR only through an approved private channel.
- Add screenshots or console output only when they provide context the HAR cannot show.
- State whether the issue is consistent, intermittent, browser-specific, or environment-specific.
When to revisit
Revisit this workflow whenever an API integration, redirect chain, authentication flow, page-load sequence, or browser automation job starts behaving differently. A monthly or quarterly review is useful for important user journeys: capture a known-good run, compare it with the previous checkpoint, and look for new requests, longer waits, changed response types, and repeated retries.
Before sharing any HAR, treat it as potentially sensitive. It may contain cookies, authorization headers, session identifiers, personal data in query strings or payloads, private URLs, and response content. Prefer a minimal reproduction account, remove or replace secrets, redact personal values, and confirm that the redacted file still demonstrates the issue. Never assume that changing a filename or hiding a visible field removes sensitive data from the underlying JSON.
Your next debugging session can follow this checklist: clear the Network panel, reproduce once, export the HAR, identify the first relevant request, inspect status and response type, read the timing phases, compare with a working run, redact the archive, and record the result. Keeping those checkpoints consistent turns a HAR file from a large log into a focused record of what the browser actually sent and received.