Skip to content
IntegrateKit

cURL to Node, Python and Java Converter

Turn a cURL command into Node.js fetch, Python requests or Java HttpClient code. Secrets are replaced with placeholders. Nothing is executed.

FreeRuns in your browser

cURL to Code tool

Runs entirely in your browser. Nothing you paste is uploaded or stored.

Generated code

The command is only parsed, never run.

Found a problem or have an idea for this tool? Send feedback.

About this tool

Paste a cURL command, for example one copied from browser developer tools or API documentation, and get the same request as Node.js fetch, Python requests or Java HttpClient code.

Secrets such as Authorization headers and basic-auth passwords are replaced with placeholders by default, so the code is safe to paste into a ticket. The command is only parsed, never run.

How to use it

  1. Paste the cURL command.
  2. Choose a language.
  3. Copy the code and fill in any placeholders from your own configuration.

Limitations

  • Common options only: method, URL, headers, body and basic auth.
  • The Java sample must run inside a method that handles checked exceptions.

Example

cURL
curl -X POST https://api.example.com/orders -H 'Content-Type: application/json' -H 'Authorization: Bearer abc123' -d '{"id":1}'
Node.js
const response = await fetch("https://api.example.com/orders", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "<AUTHORIZATION>",
  },
  body: "{\"id\":1}",
});
console.log(response.status, await response.text());

Common use cases

From docs to code

Turn the cURL example in an API guide into working client code.

Reproducing a browser call

Copy as cURL from developer tools, then convert it.

Sharing a request

Share a request with secrets removed.

Frequently asked questions