Nothing yet — inputs you run here are remembered on this device.
Paste a cURL command on the left — or hit "try example".
Nothing yet — inputs you run here are remembered on this device.
Paste a cURL command on the left — or hit "try example".
Updated 2026-08-02
Convert a cURL command into working code — JavaScript fetch, Python requests, PHP Guzzle, Go
net/http, or HTTPie. Paste anything from a README snippet to a full browser "Copy as cURL" and the
method, headers, JSON or form body and auth all carry across.
The command is parsed, never executed. It is tokenised the way a shell splits arguments —
handling single quotes, double-quoted escapes and backslash line continuations — and that is the
whole of it: no shell, no subprocess, no eval. Everything runs in your browser, and because a
copied browser request usually carries a live session token, the tool tells you when it spots one
before you paste the result somewhere public. Flags with no snippet equivalent, like -k or -L,
are surfaced as notes rather than quietly dropped.
curl 'https://api.example.com/v1/users' -X POST \
-H 'Content-Type: application/json' \
--data-raw '{"name":"Ada","active":true}'
const response = await fetch('https://api.example.com/v1/users', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Ada",
"active": true
}),
});
target: python
import requests
headers = {
'Content-Type': 'application/json',
}
json_data = {
'name': 'Ada',
'active': True,
}
response = requests.post('https://api.example.com/v1/users', headers=headers, json=json_data)
print(response.json())
curl -u admin:s3cret -k https://example.com
Authorization header added as a placeholder — base64-encode the credentials yourself. TLS verification was disabled (-k). The generated code keeps verification ON.
curl -X POST https://thesnaptools.com/api/v1/tools/curl-converter \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command":"curl 'https://api.example.com/v1/users' -X POST \\ -H 'Content-Type: applicati..."}'