cURL converter

Paste a curl command (including one copied from Chrome or Firefox with "Copy as cURL") and get the equivalent code in JavaScript, Python, PHP or Go. The command is read in your browser, it is not run and no request is sent.

Your data stays on your computer. Files are processed in your browser and are never uploaded.

Careful: the link contains the whole command, which may include tokens, passwords and cookies. Share it only with people who may see them.

Language

What is read

Method, headers, data (-d, --data-raw, --data-binary, --data-urlencode, --json), forms (-F), authentication (-u), cookies, user agent, referer, -L, -k, -G and --compressed. The command is parsed by hand and nothing is run: variables and commands ($VAR, $(…)) are not expanded.

Defaults

Without -L the generated code sets nothing about redirects: each library keeps its default behaviour (in PHP, -L enables CURLOPT_FOLLOWLOCATION). With -d, curl adds Content-Type: application/x-www-form-urlencoded when missing, and the code writes it explicitly.

Where the data goes

The command stays in your browser. If you copy the share link, the command ends up in the address (after the #, which is not sent to the server).

Keyboard shortcuts

In this tool

This tool has no keyboard actions.

Everywhere

Open this panel (outside text fields)
?
Closes panels and menus, never clears data
Esc
Search for a tool
/ or CtrlK

Tool chains

Link several tools into a path: after using a tool, “Send to…” offers the next step first. Saved chains keep only a name and the tools, never your data.

Saved chains

No saved chains.

New chain