HAR File Analyzer
Front-end engineers investigating a slow page load, SEO specialists checking whether render-blocking resources bloat the critical path, and support teams reproducing a customer performance complaint all work from the same artifact: a HAR file exported from browser DevTools. Raw HAR JSON runs to hundreds of megabytes on media-heavy pages and hides the useful signals inside nested timing objects.
This analyzer reads the file locally, then surfaces the numbers that drive decisions: total requests, transfer bytes, cache hit ratio, the ten largest resources, the ten slowest requests, and any redirect chains buried in the trace. Nothing is uploaded, so traces containing session cookies and internal URLs stay on your machine.
Top resources by transfer size
| Size | Status | Type | URL |
|---|
Slowest requests by total time
| Time | Wait | Status | URL |
|---|
Domains and status codes
Requests per domain
Status code counts
Redirect chains
How the analyzer reads a HAR file
A HAR document wraps an array of request entries under log.entries. The analyzer validates that root shape first and rejects anything else with a pointed error, because pasting a regular API response or a DevTools performance JSON produces confusing half-results if the structure check is skipped. Once validated, each entry is flattened into a single summary row: method, URL, host, status code, MIME type, transfer size, resource size, total time, wait time, cache status, and redirect target.
Transfer size prefers response.bodySize when it is positive, falling back to content.size. A negative bodySize combined with a positive content.size marks the request as served from cache, which increments the cache hit counter and keeps zero-byte rows from dragging down the bandwidth total. Hostnames are extracted with the URL constructor so counting per-domain traffic handles ports, query strings, and sub-paths correctly.
Redirect detection builds an index of every request URL, then walks each 3xx entry that carries a redirectURL field. When the redirect target appears as a later entry in the same trace, the walk continues until a final non-redirect response is reached. Each multi-hop sequence is reported in order, so you can see exactly which intermediate URL adds a round trip before the real content arrives.
Before and after: reading a real trace
Raw HAR excerpt exported from Chrome DevTools:
{
"log": {
"version": "1.2",
"entries": [
{
"request": { "method": "GET", "url": "https://shop.test/old" },
"response": { "status": 301, "bodySize": 120,
"redirectURL": "https://shop.test/new" },
"time": 180, "timings": { "wait": 90 }
},
{
"request": { "method": "GET", "url": "https://shop.test/new" },
"response": { "status": 200, "bodySize": 84000,
"content": { "size": 210000, "mimeType": "text/html" } },
"time": 640, "timings": { "wait": 410 }
}
]
}
} Analyzer output:
Requests: 2 Transfer: 84.1 KB Cache hits: 0
Redirect chains (1):
https://shop.test/old -> https://shop.test/new (final 200)
Slowest: GET /new 640 ms total, 410 ms server wait
Compression ratio on /new: 84 KB over the wire vs 210 KB
uncompressed (2.5x reduction from brotli) Who uses this analyzer
Developers
- Reproduce a slow-load report from a customer by analyzing the HAR they attached to the support ticket.
- Confirm a CDN migration actually cut transfer bytes by comparing before-and-after traces of the same page.
- Find the third-party tag contributing the largest single JavaScript payload to the critical rendering path.
Production
- Verify Cache-Control changes raised the cache hit count on static assets during a release check.
- Catch an accidental redirect chain on the document URL that delays first paint for every visitor.
- Audit which hosts a page contacts, useful after a privacy review that banned certain trackers.
Workflow
- Attach a small sanitized HAR to a pull request that claims a performance improvement, so reviewers see the byte savings.
- Walk a marketing team through the top resources list to justify compressing hero images before a campaign launch.
- Keep a baseline HAR per key template and re-analyze after each release to spot regressions early.
Common mistakes when reading HAR files
- Pasting truncated HAR JSON. DevTools sometimes writes multi-hundred-megabyte files that editors silently cut off when opened in a text box. The analyzer will report a JSON parse error pointing at the truncation; export the file again with fewer domains throttled or use the file picker, which reads the full binary without a text round trip.
- Confusing wait time with download time. A high wait value points at server processing or a slow edge; a high total time with low wait points at a large payload over a slow link. The slowest requests table lists both numbers so you can tell which side of the wire is the problem.
- Ignoring cache hits when totals look small. A second-visit trace dominated by cache hits will show a tiny transfer total that does not reflect the first-visit experience. Clear the browser cache and record a cold-load HAR when you need the numbers real visitors see on their first arrival.
- Analyzing a HAR from a different page than the complaint. Support tickets often attach a HAR of the home page when the slowness was reported on checkout. Confirm the document URL in the trace matches the template in the ticket before drawing conclusions from the resource lists.
Best practices for performance traces
- 1.Record cold-load traces with the cache disabled and DevTools throttling set to Fast 3G or Slow 4G, matching what mobile visitors actually experience.
- 2.Strip cookie and authorization headers from any HAR you attach to a public issue before sharing it, even when you plan to analyze it locally first.
- 3.Target a cache hit ratio above 70 percent on repeat views of the same template by fingerprinting static asset filenames and setting long max-age values with immutable.
- 4.Collapse redirect chains to a single hop on the document URL; each removed hop is one full round trip before any other request can start.
Frequently asked questions
What is a HAR file and how is it produced?
HAR stands for HTTP Archive, a JSON format (specification version 1.2) that browsers write when you export network activity from DevTools. In Chrome you open the Network tab, reload the page, right-click any request, and choose Save all as HAR with content. Firefox and Edge export the same structure. The file contains one entry per request with timing breakdowns, request and response headers, sizes, and cache status, which makes it the standard way to share performance traces without giving someone access to your live environment.
Does this analyzer upload my HAR file to a server?
No. HAR files routinely contain session cookies, authorization headers, and internal API URLs, so this tool reads the file entirely inside your browser using the FileReader API. The JSON never leaves the tab, is not logged, and is discarded when you close the page. You can safely analyze traces from private staging environments, admin dashboards, and authenticated single-page apps that cannot be shared with third-party services.
What does the transfer size versus resource size difference mean?
Resource size is the uncompressed size of the content the server produced, read from response.content.size. Transfer size is the bytes actually moved over the wire, read from response.bodySize, which shrinks when the server applies gzip or brotli encoding. A large gap between the two numbers is a good sign your compression is working; if both numbers are large on a text asset like JavaScript or CSS, enabling compression at the CDN or origin will cut load time immediately.
How does the tool detect redirect chains inside a HAR?
For every entry with a 3xx status code and a non-empty redirectURL field, the analyzer looks for a matching entry later in the log whose request URL equals that redirectURL, then follows the link until it reaches a final response. A chain of two or more hops is reported with the full URL sequence and the final status. Chains matter because each hop adds a round trip before any page content starts downloading; collapsing three hops into one with a short-circuit server rule is one of the cheapest performance wins available.
Why do some requests show as cache hits with zero transfer size?
When a browser serves a resource from its HTTP cache, the network stack records a bodySize of zero while the content size stays at the original byte count. The analyzer counts these as cache hits and excludes their zero bytes from the transfer total, which prevents your bandwidth numbers from looking artificially small. If the cache hit count is low for repeat visits to the same page, check your Cache-Control headers and consider extending max-age for static fingerprinted assets.
Which entries should I look at first after loading a HAR?
Start with the top resources list sorted by transfer size; the top three entries usually account for most of the bytes on the page. Then check the slowest requests list, where a high wait time on the HTML document itself points to slow server rendering or a slow CDN edge. Finally scan the redirect chains section; a redirect on the document request delays every other request on the page because nothing else starts until the final HTML arrives.
Can I analyze HAR files captured on mobile devices?
Yes. Chrome on Android supports remote debugging over USB, where you can record a network trace from a real device and export the HAR the same way as on desktop. iOS Safari supports Web Inspector traces through a Mac. The analyzer only cares about the JSON structure, which is identical across platforms, so device traces show the same stats, top resources, and redirect chains as desktop captures.
Related performance and network tools
Trace redirect paths and detect loops before they hit users
Shrink the largest image resource hurting Largest Contentful Paint
Set byte and time budgets per resource type from trace data
Inspect request and response headers captured in any trace
Find node-count bloat that pairs with large script payloads
Build the cache policies that raise your cache hit ratio