HAR Viewer & HAR to cURL.
Inspect a browser HAR file as a request table and turn any entry into a ready-to-run cURL command.
Runs in your browserAbout HAR Viewer & HAR to cURL
HAR Viewer & HAR to cURL opens the HTTP Archive files that browser developer tools export from the Network panel, shows every request as a table and turns any of them into a cURL command you can paste into a terminal. The table lists the method, URL, status, content type, response size and timing of each entry, and failed requests (status 0) are marked, so you can spot the slow or broken call quickly; the summary adds the total transferred size, total time and the tool that recorded the file. Filter by part of a URL, a method or a status code such as 404. The cURL output follows what Chrome's "Copy as cURL" produces: HTTP/2 pseudo-headers such as :authority and headers curl sets itself, like Content-Length and Host, are left out, an Accept-Encoding header becomes --compressed, cookies go into -b, request bodies use --data-raw, multipart uploads become -F fields with the original file names, and the method is only spelled out when curl would not infer it. Values are quoted safely for POSIX shells, with ANSI-C $'…' quoting when a body contains line breaks. Choose one entry by its number or get commands for all shown requests. HAR files often contain session cookies, bearer tokens and passwords, which is why this page never uploads, stores or shares them and keeps the input out of the address bar. Review and redact a HAR before sending it to anyone.
How to Use
- In DevTools, open the Network panel and choose Save all as HAR, then paste the file contents.
- Filter the requests and note the number of the one you need.
- Enter that number to get its cURL command, then copy it.
Frequently Asked Questions
How do I export a HAR file?
In Chrome or Edge open DevTools, go to Network, reload the page and choose "Save all as HAR" from the download icon or the context menu. Firefox and Safari have the same option in their network panels.
Why is the Accept-Encoding header missing from the cURL command?
It is replaced by --compressed, which asks for compressed responses and decompresses them, as Chrome's "Copy as cURL" does. Sending the raw header would make curl print compressed bytes.
Is it safe to paste a HAR with cookies and tokens?
The file is processed only in your browser and is not uploaded or saved. Still treat HAR files as secrets and redact them before sharing them with others.
Can it replay the requests?
No. The page makes no network requests; copy the cURL command and run it yourself.
Related Tools
Convert curl commands to PHP, JavaScript, or Python code.
Build HTTP requests and generate code in cURL, PHP, JS, and Python.
See the response headers, status code and redirects of any URL.
Parse Cookie and Set-Cookie headers into a table and flag SameSite, Secure, prefix and expiry problems.
Convert OpenAPI 3 / Swagger 2 into a Postman v2.1 collection, or a Postman collection into OpenAPI 3.0.
Pretty print, minify, and validate JSON.