Configuration
Paste a cURL command copied from your browser or from an API's documentation and instantly convert it into usable code. Choose the target language and the code is generated in real time with syntax highlighting. Ideal for consuming APIs quickly without writing the HTTP boilerplate by hand.
cURL command

How it works

Paste a cURL command and this tool translates it into equivalent code in the language you choose: Python, JavaScript, Go, PHP, Rust, and several more. It interprets the command's URL, method, headers, body data, and authentication and builds the corresponding HTTP request.

It is ideal when you copy a cURL command from the browser console or from an API's documentation and need to bring it into your code without manually rewriting each header and parameter. The conversion is done entirely in your browser.

Use cases

  • Turn a browser's "Copy as cURL" into code in your working language.
  • Translate an API documentation's cURL examples to your stack.
  • Reuse a request already tested in the terminal within a script or an app.
  • Compare how the same HTTP request is expressed in different languages.

Frequently asked questions

What cURL commands does it support?

It recognizes the most-used options: method (-X), headers (-H), body data (-d, --data, --data-raw), forms, basic authentication (-u), and the URL. That covers the vast majority of requests copied from the browser or from documentation.

Is the data I paste sent to any server?

No. The command is parsed and converted entirely in your browser; nothing you paste is uploaded to a server. Even so, review the result before sharing it if the command contains tokens or credentials.

How do I get a cURL command from the browser?

In the developer tools, Network tab, right-click a request and choose "Copy as cURL". That command includes the URL, the headers, and the body, ready to paste here.

Does the generated code work as-is?

In most cases yes, but it is worth reviewing it: you may need to install the language's HTTP library, adjust certificate paths, or move tokens to environment variables instead of leaving them written in the code.