HAR to cURL Commands Converter

Convert HTTP Archive requests to copy-pasteable cURL commands.

Ad placeholder (leaderboard)

Replay any captured request as cURL

When you are debugging an API you often want to re-run a single request from the command line. This tool takes a HAR (HTTP Archive) export from your browser’s Network panel and rebuilds each entry as a curl command — correct method, every header, and the request body — so you can paste it into a terminal and reproduce the call exactly. It runs entirely in your browser, which matters because HAR files routinely contain auth tokens and cookies.

How it works

The HAR is parsed with JSON.parse; each item in log.entries has a request with a method, url, a headers array and optionally postData.text. The converter emits curl -X METHOD 'URL', adds one -H 'Name: Value' per header (skipping HTTP/2 pseudo-headers like :authority that cURL sets itself), and appends --data-raw '…' when there is a body. Every quoted value is made shell-safe by escaping single quotes as '\''. If the request advertised Accept-Encoding, the --compressed flag is added so cURL decodes the response the way the browser did.

Tips and notes

  • Use the URL filter to isolate one endpoint when a HAR contains hundreds of requests (analytics, fonts, images and so on).
  • The generated command embeds whatever auth the browser sent — a Cookie or Authorization header is a live credential, so scrub it before sharing.
  • HTTP/2 pseudo-headers (:method, :path, :scheme, :authority) are omitted because cURL derives them from the URL and method automatically.
Ad placeholder (rectangle)