How to convert a HAR request to cURL
- Open the HARDrop the file on HAR Playground. Nothing is uploaded.
- Pick a requestSearch or filter the table, for example
status:500, then click the row. - Copy as cURL or fetchIn the request details, click Copy as cURL or Copy as fetch.
What the output looks like
curl 'https://api.example.com/orders' \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: [REDACTED:bearer:a1b2]' \
--data-raw '{"cartId":"c_123"}' \
--compressedThe redaction placeholder shows where a secret was. Replace it with a real token before you run the command, and keep real tokens out of tickets and chat.
Why not use Copy as cURL in DevTools?
Chrome and Edge DevTools can copy a live request as cURL, but only while the page is open and the request is still in the panel. With HAR Playground you can convert requests from a file a teammate or customer sent you, and the secrets are already removed.