cURL is a command-line tool and library (libcurl) for transferring data with URLs across HTTP, HTTPS, FTP, and dozens of network protocols.
cURL (Client URL) is an open-source command-line tool and cross-platform C library (libcurl) created by Daniel Stenberg in 1997. It is designed to transfer data across diverse network protocols—including HTTP, HTTPS, FTP, FTPS, SFTP, SCP, and WebSocket. Because of its ubiquity across Linux, macOS, and Windows operating systems, cURL is the undisputed universal standard for testing REST APIs, downloading web assets, troubleshooting network routing, and sharing reproducible API reproduction snippets.
Convert complex cURL commands to native Fetch, Axios, Python Requests, Go, or Rust code using our cURL Command Converter.
| Specification | Details |
|---|---|
| Creator & Year | Daniel Stenberg (1997) |
| Underlying Library | libcurl (Bindings for 50+ languages) |
| Supported Protocols | HTTP, HTTPS, FTP, FTPS, IMAP, POP3, SMTP, SFTP, SCP, TELNET, DICT, WS |
| HTTP Standards | HTTP/1.0, HTTP/1.1, HTTP/2, HTTP/3 (QUIC) |
| Default HTTP Method | GET (Switches to POST when -d or --data is provided) |
| Configuration File | ~/.curlrc |
| Flag | Long Option | Description | Example Usage |
|---|---|---|---|
-X |
--request |
Specifies custom HTTP method (GET, POST, PUT, DELETE). |
curl -X DELETE https://api.example.com/item/1 |
-H |
--header |
Passes extra HTTP request headers. | curl -H "Authorization: Bearer $TOKEN" ... |
-d |
--data |
Sends HTTP POST data (triggers application/x-www-form-urlencoded). |
curl -d "user=alice" https://api.example.com/login |
--json |
--json |
Sends JSON payload and automatically sets Content-Type: application/json. |
curl --json '{"name":"Alice"}' https://api.example.com |
-i |
--include |
Prints response HTTP headers alongside response body. | curl -i https://example.com |
-I |
--head |
Performs a HEAD request (headers only, no body). |
curl -I https://example.com |
-L |
--location |
Follows HTTP 3xx redirects automatically. | curl -L https://short.url |
-k |
--insecure |
Bypasses SSL/TLS certificate verification (debugging only). | curl -k https://localhost:8443 |
-s |
--silent |
Disables progress meters and error messages. | curl -s https://api.ipify.org |
curl -X POST https://api.example.com/v1/projects \
-H "Authorization: Bearer eyJhbGciOiJIUzI1Ni..." \
-H "Content-Type: application/json" \
-d '{
"name": "DevFlow Tools",
"isPublic": true,
"tags": ["developer", "productivity"]
}'
curl -w "DNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTLS: %{time_appconnect}s\nTotal: %{time_total}s\n" \
-o /dev/null -s https://api.example.com/health
# -C - resumes broken downloads, -O preserves remote file name
curl -C - -O https://releases.example.com/large-database-dump.sql.gz
// Translated from: curl -X POST https://api.devflow.tools/webhook -H "Content-Type: application/json" -d '{"event":"ping"}'
async function sendWebhookPing() {
const response = await fetch('https://api.devflow.tools/webhook', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ event: 'ping' }),
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json();
}
requests)import requests
url = "https://api.devflow.tools/webhook"
headers = {"Content-Type": "application/json"}
payload = {"event": "ping"}
response = requests.post(url, json=payload, headers=headers, timeout=10)
print(f"Status Code: {response.status_code}")
print(response.json())
$token unexpectedly, while Windows CMD requires escaping inner quotes as \". Always use single quotes around JSON payloads in bash (-d '{"key":"value"}').-k or --insecure exposes connections to Man-in-the-Middle (MitM) eavesdropping. If debugging self-signed internal certificates, pass --cacert /path/to/rootCA.crt instead.curl -H "Authorization: Bearer <secret>" logs credentials into your ~/.bash_history file. Use environment variables or --config flag to pass headers discreetly.While both are command-line file retrieval utilities, curl supports bidirectional communication across over 25 protocols with fine-grained HTTP header and payload control. In contrast, wget is optimized for recursive directory mirroring, batch file downloading, and resuming transfers over unreliable links.
Add the verbose flag -v (or --trace-ascii debug.log) to display the complete TLS negotiation, cipher suite agreements, ALPN protocol choices, and remote certificate subject validation details.
Rather than manually transcribing query parameters, multipart form data, and authentication headers, paste your cURL string into our cURL to Fetch & Axios Converter to generate ready-to-use code across 10+ languages.
Free, browser-based utilities to test, generate, and inspect cURL (Client URL) Command & Library payloads directly.
Convert cURL commands to code in 12+ programming languages instantly.
Build and test HTTP API requests with headers, body, auth, and response visualization.
Analyze HTTP response headers for security, caching, and compliance issues.