Blog · Engineering

What Is a HAR File? Structure, Export, and Analysis

By Supril Singh 5 min read

TL;DR: A HAR file (HTTP Archive) is a JSON record of every network request and response a browser made during a session — URLs, headers, bodies, status codes, and timings. You export one from the DevTools Network tab, and you read it with a viewer, a script, or a tool built for the job.

Illustration of a HAR file capturing browser network requests

What a HAR file is used for

Because a HAR captures the complete exchange from the client’s side, it answers questions that server logs cannot:

  • Diagnosing slow page loads — the timings show exactly where each request spent its milliseconds
  • Debugging failures you cannot reproduce — a capture from the affected user shows what their browser actually sent and received; see debugging with two HAR files
  • Understanding which APIs a web app really calls — the raw material for turning a site’s private API into agent tools

The structure of a HAR file

HAR is plain JSON with a single top-level log object. Inside it, the entries array does almost all the work — one entry per request:

json
{
"log": {
  "version": "1.2",
  "creator": { "name": "WebInspector", "version": "537.36" },
  "pages": [{ "id": "page_1", "title": "https://example.com/" }],
  "entries": [
    {
      "startedDateTime": "2026-04-10T09:14:05.231Z",
      "time": 45.2,
      "request": {
        "method": "GET",
        "url": "https://example.com/api/v2/orders",
        "headers": [{ "name": "accept", "value": "application/json" }],
        "queryString": []
      },
      "response": {
        "status": 200,
        "headers": [{ "name": "content-type", "value": "application/json" }],
        "content": { "size": 1024, "mimeType": "application/json", "text": "..." }
      },
      "timings": { "blocked": 1.2, "dns": 0.5, "connect": 3.1, "send": 0.2, "wait": 38.0, "receive": 2.2 }
    }
  ]
}
}

The parts you will actually read:

FieldWhat it tells you
entries[].requestThe method, URL, headers, and body the browser sent
entries[].responseThe status code, headers, and body that came back
entries[].time + timingsTotal duration, broken down into DNS, connect, wait, and receive
pagesPage-level load events (onContentLoad, onLoad)

To browse a capture visually, tools like HAR Viewer or network viewer render the JSON as a waterfall.

How to export a HAR file from Chrome DevTools

  1. Open the Network tab in Chrome DevTools.

    a] Open the Google Chrome browser

    b] At the top right corner click Three Dots > More Tools > Developer Tools > Network tab

Chrome DevTools open on the Network tab showing captured requests
  1. In the Network tab, the small export icon (⬇️) downloads the current log as a HAR file.
Export HAR button highlighted in the Chrome DevTools Network tab toolbar
  1. To capture the page-load traffic itself, make sure network log recording is enabled — the red circle icon (🔴) means recording is on — then reload the page you want to analyze.
Chrome DevTools network log recording enabled, indicated by the red record icon
  1. That’s all — export the HAR file and you are ready to analyze it.

How to export a HAR file with sensitive data

Chrome sanitizes HAR exports by default, so cookies, Set-Cookie, and Authorization headers may be excluded. If you need the full session data for debugging — for example, to trace an authentication flow — enable the sensitive data option before exporting:

  1. Open Chrome DevTools and go to Settings.

  2. In Preferences, scroll to the Network section.

  3. Enable Allow to generate HAR with sensitive data.

Chrome DevTools preference to allow generating HAR files with sensitive data
  1. Go back to the Network tab and reload the page so the requests are captured again.

  2. Export the HAR file using the download icon. Chrome will now include the sensitive request data.

Warning: only export HAR files with sensitive data when necessary, and share them carefully. They can contain cookies, auth tokens, and private user information — effectively a live credential set for the account that captured them.

Frequently asked questions

What does HAR stand for? HTTP Archive. It is a JSON-based format for logging a browser’s HTTP transactions; version 1.2 is the one browsers export today.

How do I open a HAR file? It is plain JSON, so any text editor works. For something readable, drag the file into Chrome’s Network tab to re-import it, or use a dedicated viewer like HAR Viewer.

Are HAR files safe to share? Not by default. Chrome strips some sensitive headers on export, but request and response bodies are still included and can carry tokens or personal data. Scrub a capture before sharing it outside a trusted channel.

Do all browsers export HAR files? Yes — Chrome, Firefox, Edge, and Safari can all export a HAR from their developer tools, and the format is the same across them.


Exporting the file is the easy part; the value is in reading it. Start with diffing a working capture against a broken one — or upload a HAR to TraceMiner and ask it questions in plain language.

Keep reading

More guides and writeups from the TraceMiner blog.