🌀curl Converter - Convert curl Commands to fetch, axios, Python, Go, PHP & Java
Right-click a request in your browser’s DevTools and choose Copy as cURL, or grab a curl example from API docs, then paste it here to get runnable code. The parser follows shell rules for single quotes, double quotes, $'...' escape strings, backslash line continuations and even the ^ continuations of Windows cmd. It understands -X, -H, -d / --data / --data-raw / --data-binary / --data-urlencode, --json, -F file uploads, -u basic auth, -b cookies, -A user agent, -e referer, -G, -I, -L, -k, --compressed, --max-time, -x proxy and more, and infers the method and Content-Type the way curl does — -d implies a form-encoded POST, while -G moves the data into the query string. Code is generated for JavaScript fetch, axios, Node.js http(s), Python requests, Go net/http, PHP cURL and Java 11 HttpClient; JSON bodies become native object literals and file uploads become FormData or multipart code. The parsed request panel lists the method, URL, query parameters, headers, auth, body and any ignored options, which also makes it a handy way to read a complicated curl command.
Free · No sign-up · Runs in your browserLast updated:
How to use curl Converter
- 1Copy a request as cURL from DevTools, or copy a curl command from API docs
- 2Paste it into the input and pick a target language
- 3Copy the generated code and check the parsed request on the right
FAQ
- How do I copy a request as curl from my browser?
- Open DevTools (F12), switch to the Network panel, trigger the request, then right-click it and choose Copy → Copy as cURL (bash). On Windows prefer the bash variant; the cmd variant’s ^ continuations are handled too, but cmd escaping is intricate, so double-check unusual characters.
- Why is it a POST even though the command has no -X POST?
- That is how curl behaves: any -d / --data option or -F form field makes curl send a POST, -I sends HEAD, -T uploads with PUT, and -G turns the -d data into query parameters on a GET. The converter follows the same rules, and an explicit -X always wins.
- Which curl options are not supported?
- Options that do not affect the request itself, such as -s, -v, -o or --http2, are ignored without changing the code, and uncommon options are listed under Ignored options. Bodies read from files (-d @file) and -F file uploads generate file-reading code with the path for you to adjust. Browser fetch cannot skip TLS verification, so -k is noted in a comment.
- Are the tokens and cookies in my command safe?
- Yes. Parsing and code generation happen entirely in your browser; no request is sent and the command is never uploaded. Commands copied from a browser often contain session cookies and tokens, though, so remove them before sharing the generated code.