What is a HAR file?
A HAR file is a JSON log of every network request a browser made: URLs, headers, status codes, bodies and timings. Browsers export it from DevTools, and support teams ask for it when something breaks. The format is HAR 1.2.
Every generated entry follows the HAR 1.2 rules: required fields present, sizes that match the bodies, a query string that matches the URL, and a total time equal to the sum of the timings. Secrets can be redacted the way sanitising tools do it.
Anatomy of a HAR file
log.version"1.2"log.creatorThe tool that wrote the filelog.pages[]Each page load, with onContentLoad and onLoadentries[].requestMethod, URL, headers, cookies, query string and post dataentries[].responseStatus, headers, content with MIME type and sizeentries[].timingsblocked, dns, connect, ssl, send, wait, receive (ms)
What you can generate
- 2xx, 3xx, 4xx, 5xx and failed requests (status 0)
- Redirect chains with Location and redirectURL
- Query strings, POST bodies and Unicode URLs
- Cookies and Authorization headers, redacted or present
- Base64-encoded image bodies and gzip sizes
- Slow requests over 10 seconds
- Broken on purpose: missing required fields or truncated JSON
How to make one
- Open the HAR generator, or start from a preset above.
- Set the size and switch on the edge cases you need; the preview and size estimate follow every change.
- Generate, then download. The file is made in your browser, and the same preset and seed always give you the same file.
Questions
No. Every URL, header and body is synthetic and points at example.test domains, so the files are safe to share in bug reports.
Chrome, Edge and Firefox DevTools can import HAR files, as can HAR viewers, Charles, Fiddler and many support tools.
Yes. Choose Missing required fields (no log.version, no timings on the first entry, no MIME type on the second) or Truncated JSON.
Yes. Each entry's time is the sum of its timings, ssl is part of connect, and DNS and connect are -1 when a connection is reused.