PB
Available
swap_horiz
lock Free · Private · In-Browser

HAR to cURL Converter

Recreate a selected HAR request as a copy-ready cURL command.

 

Replay a captured HAR request with cURL

A browser HAR stores each network request as structured JSON, which is more reliable than reconstructing a request from a screenshot. This converter validates the HAR log, selects an entry by zero-based index, and emits cURL with its method, URL, headers, and textual post body. Shell arguments use single-quote escaping so spaces and most special characters remain intact.

The default HAR entry becomes a POST to the items endpoint with a Content-Type application/json header and the captured JSON body. Content-Length is omitted because cURL calculates it for the actual body. Selecting an index outside the entries array or a request missing its URL or method returns an explicit error.

Sensitive headers and HAR limitations

HAR files can contain cookies, Authorization headers, query secrets, and private response metadata. The conversion runs only in your browser and does not replay the request, but you should still remove credentials before sharing the command. Binary request bodies and multipart parameters may not appear as simple postData text and require manual reconstruction. Confirm that replaying a captured operation is safe and idempotent.

Frequently Asked Questions

Does this send or replay the HAR request?

No. It reads the HAR locally and only produces a cURL command.

Why is Content-Length omitted?

cURL computes Content-Length from the body it sends, avoiding a stale length copied from the capture.

Can HAR files contain secrets?

Yes. Cookies, authorization headers, and query tokens may be present, so redact generated commands before sharing them.

Take it further
All Free Tools

Browse the full set of free, private, in-browser tools.

Learn More arrow_forward