Why it matters
API docs give examples as curl commands, and browsers can copy any request as curl. Turning that into code means translating quoting, headers, auth and body flags by hand, and a missed escape breaks the request.
This converter parses the command the way a POSIX shell does, then writes idiomatic code for the language you pick. Nothing is sent: it only converts, so commands with real tokens stay on your device (still, rotate any token you've pasted somewhere public).
How it works
- InputA curl command, e.g. Copy as cURL
- In your browserParsed like a shell, every flag mapped
- Outputfetch, Python, Go, PHP, HTTPie or PowerShell
Where it fits in a designer's workflow
- Plan
- Design
- Build
- Test
- Launch
By the numbers
Show the numbers as a table
| Language | Lines |
|---|---|
| JavaScript fetch | 16 |
| Python requests | 17 |
| Go net/http | 33 |
| PHP cURL | 21 |
| HTTPie | 7 |
| PowerShell | 13 |
How to use it
- Paste a curl command, including line breaks with backslashes.
- Pick the language you want.
- Check the table of method, URL, headers and body.
- Copy or download the code.
FAQ
Does it run the request?
No. It only converts the command, so no request is made.
Which curl options are understood?
The common ones: -X, -H, -d and --data-*, --json, -F, -u, -b, -A, -e, -L, -k, -I, -G and --compressed. Others are listed as ignored.
Is 'Copy as cURL' from Chrome supported?
Yes, including the bash format with $'…' quoting.
Is my token safe?
It stays in your browser. Treat tokens in commands as secrets anyway, and use the masked placeholder in docs.