Paste a cURL command and get the equivalent fetch, Axios, Python requests or HTTPie code. Right-click any request in your browser's network panel, choose Copy as cURL, and paste it straight in — the quoting, escapes and backslash line continuations that come with it are all handled, because the command is read by a small shell tokenizer rather than split on spaces. That distinction matters more than it sounds: a whitespace split destroys any header or body containing a space, which is nearly all of them. The method is inferred exactly as cURL infers it, so a command with a data flag and no -X is correctly a POST rather than a GET. And anything that cannot be translated — certificate verification disabled, a proxy, an output file, a multipart form — is called out rather than quietly dropped. Nothing is executed.
| Flag | Becomes |
|---|---|
| -X / --request | The HTTP method |
| -H / --header | A request header |
| -d and its four aliases | The request body, POST if no -X |
| -u / --user | Basic auth, split into username and password |
| -b, -A, -e | Cookie, User-Agent and Referer headers |
| -L / --location | Follow redirects |
| -k / --insecure | Reported — no browser equivalent |
| -F / --form | Reported — rebuild with FormData |
No. The command is parsed and rewritten only. That matters here because commands copied from a network panel routinely contain session cookies and bearer tokens, and none of it leaves your browser.
They split on whitespace. A cURL command is shell syntax, so a header like 'Content-Type: application/json' is one argument, not two. Anything containing a space, an escape or a line continuation needs a real tokenizer.
Yes. cURL sends POST whenever a data flag is present and no method is given. Commands copied from a browser very often look like that, and treating them as GET is a common bug in other converters.
They are reported. --insecure, --proxy, --output and -F all produce a visible note saying what was lost. Silently dropping --insecure in particular would produce code that behaves differently from the command you pasted, in a way that matters.
Yes. Backslash line continuations, including the Windows CRLF form, are removed before parsing, so a command pasted across several lines works as-is.
Yes. JavaScript output is JSON-encoded rather than wrapped in whichever quote looked free, so a body full of double quotes escapes properly. Python switches to triple quotes when a value contains both quote styles.
The command is tokenised by a small POSIX shell reader rather than split on whitespace, which is the difference between a converter that works on real input and one that works on examples. A cURL command copied out of a browser's network panel arrives with single quotes, double quotes, backslash escapes and line continuations, and any header or body containing a space — which is to say most of them — is destroyed by a naive split. Single quotes are treated as fully literal, double quotes honour escapes only before a backslash, quote, dollar or backtick as the shell does, backslash-newline continuations are removed, and adjacent quoted runs concatenate. Flags are then read with their aliases: the five spellings of the data flag, both forms of header, the --flag=value form as well as --flag value, bundled short flags such as -sSL, and the positional URL which cURL permits anywhere in the command. The method is inferred the way cURL itself infers it — any data flag implies POST unless -X says otherwise — which matters because commands copied from a network panel frequently have no explicit method and are not GETs. Cookie, user-agent and referer flags are folded into the headers they actually become. Flags with no equivalent in the target language are not silently dropped: --insecure, --proxy, --output and -F each produce a visible note explaining what was lost, because a converter that quietly discards certificate verification is worse than one that refuses. Output escaping is per language: JavaScript strings are JSON-encoded so a JSON body survives, and Python switches to triple quotes when a value contains both quote styles. Nothing is executed.