Blog

What is a HAR file and what is inside it?

Published December 5, 2026 · Updated December 5, 2026 · Mirage Browser

A HAR file, short for HTTP Archive, is a JSON log of every network request a page made: the address, method, headers, status, timings and often the response body. Developers and support teams use it to see why a page is slow or broken. It can contain cookies and tokens that open accounts, so clean it before sharing.

What does a HAR file look like?

A JSON object with a log that lists the pages and the requests, called entries:

JSON
{
  "log": {
    "version": "1.2",
    "entries": [
      {
        "startedDateTime": "2026-12-05T10:15:02.120Z",
        "time": 182,
        "request": { "method": "GET", "url": "https://shop.example/api/orders/10045", "headers": [] },
        "response": { "status": 200, "content": { "mimeType": "application/json" } }
      }
    ]
  }
}

Version 1.2 is the one browsers and tools exchange today. DevTools in Chrome and Firefox can save and open it.

What is it useful for?

Question Where to look
Why is the page slow? time and timings of each entry
Which request failed? response.status of 4xx and 5xx
What does the site’s API return? Request URL and response content
Did a request go where it should? The host of every URL

Why is a HAR file risky to share?

It records headers, and headers carry Cookie and Authorization. Anyone with those values can act as you on the site until the session ends. Responses can contain personal data. Several support teams ask for HAR files and warn about exactly this. Before sending one:

  1. Remove Cookie, Set-Cookie and Authorization headers.
  2. Remove tokens from URLs and request bodies.
  3. Keep only the entries the question is about.

How do I get one from a browser profile?

In DevTools open the Network panel, reproduce the problem and export. In Mirage you do not have to reproduce it: if the profile was recorded, open the recording, go to the API tab and press Save HAR. Cookies and tokens are hidden unless you tick them in, and credentials appear by name and kind, never by value.

What is an API map?

A HAR file is a flat list. Grouping it by method, host and path, with ids replaced by placeholders such as {id}, turns hundreds of entries into a short list of endpoints with their parameters and fields. Comparing two such maps shows what changed on a site between yesterday and today. Mirage builds this map from every recording and can save it as Markdown for an AI agent.

More: session recordings.

Where do these facts come from?