cURL Converter
Paste a cURL command, for example from your browser’s DevTools “Copy as cURL”, and get the same request as fetch, Axios, Python, Go, PHP or Node code. Or convert a fetch() call back to cURL.
Handles DevTools “Copy as fetch” output and hand-written calls with literal URLs, headers and bodies (including JSON.stringify({...})). Variables can’t be resolved without running the code, which this page never does.
Frequently Asked Questions
How do I get a cURL command for a request in my browser?
Open DevTools (F12), go to the Network tab, right-click a request and choose Copy → Copy as cURL (bash). Paste it here to turn it into code.
Is it safe to paste commands that contain tokens or cookies?
Conversion happens entirely in your browser with no network requests, and nothing is stored. Still, treat the generated code as sensitive if it contains credentials.
Which curl options are supported?
-X, -H, -d / --data / --data-raw / --data-binary / --data-urlencode, --json, -F, -u, -b, -A, -e, -G, -I, -k, -L, --compressed and --url. Output-only flags such as -s, -v, -o and -i are ignored.
Why is -k (insecure) not translated?
Disabling TLS verification is rarely what you want in code. The converter adds a comment instead of silently turning verification off.