Skip to content
midgeDocs
HAR filesWhat is a HAR file?
HAR files

What is a HAR file?

A HAR file is a JSON log of the network requests a browser made. Learn what's inside one, who asks for it and why, and how to share it safely.

A HAR file (HTTP Archive) is a JSON file that records the network requests a web page made in your browser: every URL, the request and response headers, cookies, request bodies, response bodies, status codes and detailed timings. You create one from the Network panel of your browser’s developer tools, and support or engineering teams use it to see exactly what happened between your browser and their servers.

People ask for HAR files when a problem only shows up on your machine: a login that loops, an upload that fails, a page that loads slowly for one customer. The file lets someone else replay the network side of your session without screen sharing. The catch is that it can also contain your session cookies, tokens and personal data, so it needs cleaning before you send it.

What HAR stands for and where the format comes from

HAR stands for HTTP Archive. The format is plain JSON and is meant to be saved as UTF-8. Version 1.2 is the one browsers write today. A specification draft for it was prepared under the W3C Web Performance Working Group, but that draft was never published as a standard and is marked as abandoned. In practice, HAR is a de facto standard: Chrome, Edge, Firefox and Safari can all export and import it, and many debugging and performance tools read it.

Because it is plain JSON, you can open a HAR file in any text editor. It is just usually too long to read that way, which is why HAR viewers exist.

What’s inside a HAR file

Everything lives under one root object called log. The parts you will see most often:

  • version and creator: the HAR version and the tool that wrote the file.
  • browser: optional name and version of the browser.
  • pages: one object per page load, with its title, start time and page timings such as onContentLoad and onLoad.
  • entries: one object per HTTP request. This is where nearly all the useful data is.

Each entry describes one request from start to finish:

  • request: the method, full URL, HTTP version, headers, cookies, query string parameters and, for POST or PUT requests, the body in postData.
  • response: the status code, headers, cookies, a redirect URL if there was one, and the body in content along with its MIME type and size. Binary bodies may be stored as base64 text.
  • timings: how long each phase took, in milliseconds.
  • startedDateTime and time: when the request started and how long it took in total.
  • serverIPAddress and connection: optional details about which server and connection were used.
  • cache: information about cache use.

Tools are also allowed to add their own fields, as long as the names start with an underscore. Browsers use this to store extra details, such as what triggered a request.

A trimmed example

Here is a shortened HAR file with one page and one failing API request. Real files repeat the entry block hundreds or thousands of times.

json
{
  "log": {
    "version": "1.2",
    "creator": { "name": "WebInspector", "version": "537.36" },
    "pages": [
      {
        "startedDateTime": "2026-11-10T09:14:02.118Z",
        "id": "page_1",
        "title": "https://app.example.com/billing",
        "pageTimings": { "onContentLoad": 412.6, "onLoad": 988.3 }
      }
    ],
    "entries": [
      {
        "pageref": "page_1",
        "startedDateTime": "2026-11-10T09:14:03.540Z",
        "time": 1284.2,
        "request": {
          "method": "POST",
          "url": "https://api.example.com/v1/invoices?draft=true",
          "httpVersion": "HTTP/2",
          "headers": [
            { "name": "content-type", "value": "application/json" },
            { "name": "authorization", "value": "Bearer eyJhbGciOiJIUzI1NiJ9..." }
          ],
          "queryString": [{ "name": "draft", "value": "true" }],
          "cookies": [{ "name": "session_id", "value": "s%3A9f2c..." }],
          "postData": {
            "mimeType": "application/json",
            "text": "{\"customerId\":\"cus_4821\",\"amount\":4900}"
          },
          "headersSize": -1,
          "bodySize": 39
        },
        "response": {
          "status": 500,
          "statusText": "",
          "httpVersion": "HTTP/2",
          "headers": [{ "name": "content-type", "value": "application/json" }],
          "cookies": [],
          "content": {
            "size": 50,
            "mimeType": "application/json",
            "text": "{\"error\":\"internal_error\",\"requestId\":\"req_7Hq2x\"}"
          },
          "redirectURL": "",
          "headersSize": -1,
          "bodySize": 50
        },
        "cache": {},
        "timings": {
          "blocked": 2.1, "dns": -1, "connect": -1, "ssl": -1,
          "send": 0.4, "wait": 1278.9, "receive": 2.8
        },
        "serverIPAddress": "203.0.113.24"
      }
    ]
  }
}

A developer reading this learns a lot in a few seconds: the invoice request reached the server, waited almost 1.3 seconds, and came back with a 500 and a request ID they can search for in their server logs.

How the timings work

The timings object breaks a request into phases:

  • blocked: time spent waiting in a queue for a connection.
  • dns: time to resolve the host name.
  • connect: time to open the TCP connection. If ssl is present, the TLS handshake time is included in connect too.
  • send: time to send the request.
  • wait: time waiting for the first byte of the response. A large number here usually points at the server.
  • receive: time to read the whole response.

A value of -1 means the phase did not apply. In the example above, dns and connect are -1 because the browser reused an existing connection. The entry’s time is the sum of all the phases that are not -1.

Who asks for HAR files and why

  • Support teams at software vendors ask for a HAR file when a customer reports something they cannot reproduce. It shows which request failed and what the server returned.
  • Developers use HAR files to compare a working session with a broken one, to check which headers a request carried, or to find a slow endpoint.
  • QA testers attach them to bug tickets so the developer does not have to reproduce the issue just to see the API error.
  • Performance work relies on the timing data to find slow requests, large downloads and long chains of dependent requests.

Typical problems where a HAR file settles the question: a redirect loop at sign-in, a CORS error, a request that returns 200 with an error message in the body, an upload that is cut off, or a third-party script that blocks the page.

What a HAR file does not contain

A HAR file is only the network side of the story. It does not include console errors, a screenshot or video of what you saw, the buttons you clicked, or the state of the page. That is why a good bug report pairs the HAR file with the console output and clear steps. See our bug report template for a checklist.

The privacy risk

A HAR file is close to a full transcript of your session. Depending on how it was exported, it can include:

  • Session cookies in Cookie and Set-Cookie headers. With a valid session cookie, someone can often act as you without a password.
  • Authorization headers with bearer tokens or API keys.
  • Tokens in URLs, such as access_token, code or signed link parameters.
  • Everything you submitted in forms, including passwords if you signed in while recording.
  • Personal data in responses: names, emails, addresses, order history.

Recent versions of Chrome and Edge export a sanitized HAR by default, which leaves out Cookie, Set-Cookie and Authorization headers. That helps, but tokens in URLs, request bodies and response bodies stay in the file. Firefox and Safari do not describe any sanitizing in their documentation, so treat their exports as complete.

Before you share any HAR file, run it through our HAR sanitizer. It removes cookies, authorization headers, tokens, passwords and card numbers in your browser, without uploading the file. Then open the result in the HAR viewer to confirm nothing sensitive is left. Our guide on removing sensitive data from a HAR file covers what to look for. Share the file only through the support channel that asked for it, and sign out of the app afterward if you recorded while signed in, which invalidates the session in most apps.

How to create one

Every major browser can export a HAR file from its Network panel. The short version: open developer tools, select the Network panel, turn on the option that keeps the log across page loads, reproduce the problem, and export. Menus change between browser versions, so if a label looks different, look for the export or download icon in the Network panel toolbar. Step-by-step guides:

When a HAR file is more than you need

Sometimes the person debugging only needs the failing request and the console error around it, not a full archive of the session. Midge, a free Chrome extension, is built for that case. Every recording includes console logs, network requests, user actions and device info. Passwords, card numbers, tokens and cookies are redacted in your browser before anything leaves your device. The redaction is rule-based, so an unusual secret format can be missed; teams can add their own field and header names. The HAR viewer and HAR sanitizer linked above are free to use too.

Official documentation

The format details above come from the HAR 1.2 draft, and the export behavior from browser documentation, both checked on November 10, 2026.

Frequently asked questions

What does HAR stand for?

HAR stands for HTTP Archive. It is a JSON-based format that browsers and debugging tools use to save a record of network requests, responses and timings.

Is it safe to share a HAR file?

Only after you clean it. A HAR file can contain session cookies, authorization headers, tokens in URLs, form data you submitted and personal data in responses. Remove those first, for example with a HAR sanitizer, and share it only with the people who need it.

How do I open a HAR file?

You can import it into the Network panel of Chrome, Edge, Firefox or Safari, or open it in a HAR viewer that runs in your browser. Because it is plain JSON, a text editor also works for quick searches.

Does a HAR file include console errors or a video of the problem?

No. The HAR format records network traffic only. Console messages, screenshots and the steps you took need to be captured separately.

How big can a HAR file get?

It depends on how long you record and what the page loads. Response bodies are stored as text, so a few minutes on a media-heavy app can produce a file of tens of megabytes.