cURL Converter

Convert a cURL command into fetch, axios, Python, Go, PHP or Ruby code — or build a request and get cURL

100% private: everything is converted in your browser, nothing is uploaded.

const response = await fetch("https://api.example.com/v1/users", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_TOKEN"
  },
  body: JSON.stringify({
    "name": "Jordan Avery",
    "role": "admin"
  })
});
const data = await response.json();
console.log(data);