Monitoring
Solutions
Resources
Free Tools
Pricing
Free Tools / HTTP & web / curl Command Builder

curl Command Builder

Fill in the request — method, headers, body, authentication — and get a curl command with the quoting done correctly. Add the timing option to see where a slow request spends its time.


Runs entirely in your browser — nothing you enter here is sent to a server.

Why curl commands go wrong

curl is the common language of HTTP debugging: every API's documentation has examples in it, every server has it installed, and "send me the curl" is how engineers reproduce each other's problems. The requests themselves are simple. What breaks is the shell in between — a JSON body with an apostrophe in a name, a URL with & that the shell treats as "run in background", a header with a $ that gets expanded to nothing.

The builder does the quoting for you. On bash and zsh everything goes in single quotes, with embedded apostrophes written as '\''. PowerShell doubles the apostrophe instead, and uses curl.exe because plain curl is an alias for a different command there. A credential written as $API_TOKEN is put in double quotes so the shell substitutes it — keeping the secret out of your command history.

-L follow redirects

Without it curl stops at a 301 or 302 and shows the redirect, not the page. Usually what you want for a quick check.

-f fail on errors

Makes curl exit with a non-zero code on a 4xx or 5xx. Essential in scripts and health checks, where an error page must not count as success.

-sS silent, but show errors

Hides the progress meter while still printing real errors — the right pair for cron jobs and pipelines.

--max-time

curl waits for ever by default. Any curl in a script needs a time limit, or one hung server will hang the script.

Timing a request

The "timing breakdown" output uses curl's -w option to print where the time went: DNS lookup, TCP connect, TLS handshake, time to first byte and total. The values are cumulative, so the gaps between them are what matter. A large jump before connect points to the network, before tls to the handshake, and between tls and first byte to the application doing its work. It is the quickest way to tell a slow server from a slow network.

Frequently asked questions

How do I send JSON with curl?

Use -H 'Content-Type: application/json' and -d with the JSON in single quotes: curl -H 'Content-Type: application/json' -d '{"key":"value"}' URL. Using -d makes the request a POST automatically.

How do I escape a single quote inside a curl command?

In bash, close the quote, add an escaped apostrophe and reopen: 'O'\''Brien'. In PowerShell, double it: 'O''Brien'. The builder applies the right form for the shell you select.

How do I see only the HTTP status code?

curl -s -o /dev/null -w '%{http_code}\n' URL. The body is discarded and the write-out option prints just the code.

Why does curl behave differently in PowerShell?

In Windows PowerShell, curl is an alias for Invoke-WebRequest, which takes different arguments. Call curl.exe explicitly to run the real curl.

Related free tools

curl tells you the endpoint works right now. A monitor tells you when it stops.

Upzilla runs the same HTTP check every minute from several locations and alerts you on errors or slow responses. 10 monitors free.

Start monitoring free →