Pasted commands often contain live tokens, so nothing is sent to a server, and you can swap secrets for placeholders before sharing the code.
From curl to code
curl is the common language of HTTP. API documentation shows examples as curl commands, and every browser’s developer tools can copy a network request “as cURL”. Turning that into application code by hand is tedious and easy to get subtly wrong: a missing header, a body sent as text instead of JSON, or a form encoded the wrong way. CurlConvert reads the command the way a shell would, then writes idiomatic code for the library you use.
How the command is read
First the command is split into words exactly as bash would split it, honouring single and double quotes, backslash escapes, $'…' strings and line continuations with a backslash or a Windows caret. Then each option is interpreted. A -d or --data option makes the request a POST unless you set a method with -X, and adds a form content type unless you supplied one. Several -d options are joined with an ampersand. With -G the data moves into the URL as a query string. --json sets both JSON headers. -F builds a multipart form, and a value starting with @ is treated as a file upload. -u becomes basic authentication.
What you get
For fetch and Axios, JSON bodies are written as readable objects rather than escaped strings, so they are easy to edit. Python code uses json= for JSON, data= with a dictionary for forms, and files= for uploads, and converts JSON literals to Python ones. PHP code uses curl_setopt calls and CURLFile. Go code is a complete program using only the standard library. The JSON view shows exactly how the command was understood, which is handy for debugging.
Keeping secrets safe
Commands copied from a browser usually include cookies, session tokens or API keys. The conversion runs entirely in your browser and nothing is uploaded. The command is kept only for this tab and disappears when you close it; only your language choice is remembered. Before pasting generated code into a ticket, chat or repository, tick the placeholder option to replace authorization headers, cookies, API keys and passwords with obvious placeholders.
Things to check
Options that have no direct equivalent, such as proxies, output files and progress meters, are listed as warnings rather than silently dropped. If the command reads data from a file with @filename, paste the file’s contents into the body. Browser requests also need the server to allow cross-origin access; curl does not.
Frequently asked questions
Which curl options are supported?
Methods, headers, -d and its variants, --data-urlencode, --json, -F forms, -u, -b, -A, -e, -G, -I, -L, -k and --compressed. Others are listed as ignored.
Does it work with Copy as cURL from Chrome?
Yes, including bash and Windows line continuations and $'…' strings.
Is my token safe?
The conversion runs entirely in your browser. The command is kept only for this tab and cleared when you close it.
Is CurlConvert free?
Yes, with no sign-up, ads or limits.
Are my commands uploaded?
No. Parsing and code generation happen in your browser.