cURL Converter โ 9 Languages, Instant Output
cURL โ fetch ยท axios ยท Python ยท Go ยท PHP ยท Ruby ยท HTTPie ยท Postman
Paste any cURL command and instantly get equivalent code in 9 languages: JS fetch(), axios, Python requests, Node.js request, PHP curl_exec, Go net/http, Ruby Net::HTTP, HTTPie CLI, and Postman collection JSON. Auto-detects method, headers, body type (JSON/form/raw), and auth (Bearer/Basic). 10 built-in sample cURLs. Toggle pretty print. Share URL with encoded cURL.
const response = await fetch('https://api.example.com/users', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "John",
"email": "john@example.com"
})
});
const data = await response.json();
console.log(data);const { data } = await axios({
url: 'https://api.example.com/users',
method: 'post',
headers: {
'Content-Type': 'application/json'
},
data: {
"name": "John",
"email": "john@example.com"
}
});
console.log(data);import requests
headers = {
'Content-Type': 'application/json',
}
payload = {
"name": "John",
"email": "john@example.com"
}
response = requests.post('https://api.example.com/users', headers=headers, json=payload)
print(response.json())const request = require('request');
request({
url: 'https://api.example.com/users',
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: '{"name":"John","email":"john@example.com"}'
}, (error, response, body) => {
if (error) throw new Error(error);
console.log(body);
});<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.example.com/users');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"name":"John","email":"john@example.com"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{"name":"John","email":"john@example.com"}`)
req, _ := http.NewRequest("POST", "https://api.example.com/users", payload)
req.Header.Add("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Frequently Asked Questions
What cURL flags are supported?
Supports -X (method), -H (headers), -d/--data/--data-raw (body), -u/--user (basic auth), -F/--form (multipart), --compressed, -s (silent). Bearer token detection from Authorization header.
How do I get a cURL from browser DevTools?
In Chrome: DevTools โ Network tab โ right-click any request โ Copy โ Copy as cURL. Paste directly here. Works with all headers including cookies and auth tokens.
Does it support multiline cURL?
Yes โ cURL commands with line continuation backslashes (\) across multiple lines are normalized and parsed correctly.
Is my API key safe?
Yes โ all conversion runs in your browser. Nothing is sent to any server. Works completely offline once loaded.
How do I import the Postman JSON output?
Enable "Postman JSON" in the language toggles. Copy the output. In Postman: File โ Import โ Raw text โ paste โ Import. Your request is created as a collection item.