cURL Converter
Parse a curl command and emit fetch, Node https, Python requests, Ruby Net::HTTP, Go net/http, PowerShell, HTTPie, and wget equivalents.
POST https://api.example.com/v1/users
2 headers
body: 44 bytes
JavaScript fetch
const res = await fetch("https://api.example.com/v1/users", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer abc123"
},
body: "{\"email\":\"alice@example.com\",\"name\":\"Alice\"}"
});
const data = await res.text();Node https
import https from "node:https";
const url = new URL("https://api.example.com/v1/users");
const req = https.request({
method: "POST",
hostname: url.hostname,
port: url.port,
path: url.pathname + url.search,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer abc123"
}
}, (res) => {
let body = "";
res.on("data", (c) => body += c);
res.on("end", () => console.log(body));
});
req.write("{\"email\":\"alice@example.com\",\"name\":\"Alice\"}");
req.end();Python requests
import requests
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer abc123",
}
payload = {"email":"alice@example.com","name":"Alice"}
r = requests.post("https://api.example.com/v1/users", headers=headers, json=payload)
print(r.text)Ruby Net::HTTP
require "net/http"
require "uri"
require "json"
uri = URI("https://api.example.com/v1/users")
req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req["Authorization"] = "Bearer abc123"
req.body = "{\"email\":\"alice@example.com\",\"name\":\"Alice\"}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(req)
end
puts res.bodyGo net/http
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"email":"alice@example.com","name":"Alice"}`)
req, _ := http.NewRequest("POST", "https://api.example.com/v1/users", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer abc123")
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}PowerShell Invoke-WebRequest
$headers = @{
"Content-Type" = "application/json"
"Authorization" = "Bearer abc123"
}
$response = Invoke-WebRequest -Method POST -Uri "https://api.example.com/v1/users" -Headers $headers -Body "{\"email\":\"alice@example.com\",\"name\":\"Alice\"}" -MaximumRedirection 0
$response.ContentHTTPie
http POST https://api.example.com/v1/users Content-Type:application/json Authorization:'Bearer abc123' <<< '{"email":"alice@example.com","name":"Alice"}'wget
wget --method=POST --header='Content-Type: application/json' --header='Authorization: Bearer abc123' --body-data='{"email":"alice@example.com","name":"Alice"}' --max-redirect=0 https://api.example.com/v1/users</>Use this tool programmaticallycurl · JavaScript · MCP
Same tool, callable from any HTTP client or from Claude (via MCP). Anonymous: 100 req/day per IP. Sign up for 1,000 req/day.
curl
curl https://api.b-e-a-d.com/tools/curl-converter/run \
-H "Content-Type: application/json" \
-d '{
"curl": "a"
}'JavaScript (fetch)
const res = await fetch("https://api.b-e-a-d.com/tools/curl-converter/run", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"curl": "a"
}),
});
const data = await res.json();
console.log(data.result);MCP (Claude Desktop / Claude Code)
# In Claude Desktop / Claude Code, add to your MCP config:
{
"mcpServers": {
"bead": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.b-e-a-d.com"]
}
}
}
# Then ask Claude to call:
mcp__bead__bead_curl_converterFull reference: developer docs · OpenAPI spec
What we parse
Method (-X), headers (-H), body (-d, --data-raw, --data-binary), basic auth (-u), cookies (--cookie, -b), insecure flag (-k), follow redirects (-L), and the URL. Quotes (single, double, and $'…') are respected.
Output languages
JavaScript fetch, Node https module, Python requests, Ruby Net::HTTP, Go net/http, PowerShell Invoke-WebRequest, HTTPie, and wget.
You might also like
- IP Address ConverterConvert IPv4 between dotted decimal, integer, hex, and binary notations. Compress and expand IPv6.
- MAC Address FormatterConvert MAC addresses between colon, hyphen, Cisco dot-quad, and bare formats.
- CSV ↔ JSON ConverterConvert CSV to JSON or JSON to CSV with quoted fields and configurable delimiters.
- Data Size ConverterConvert between bytes, kilobytes, megabytes, gigabytes, bits, and their binary (KiB, MiB) cousins.