Boneyard Tools

curl Command Builder

Fill in the URL, method, headers and body and get a ready to run curl command. JSON and form bodies set the right Content-Type, and every value is safely single-quote escaped.

How to build a curl command

  1. Enter the URL and choose the HTTP method.
  2. Add any headers and a request body, picking raw, JSON or form.
  3. Toggle flags like follow redirects, then copy the command.

Examples

GET with a header

GET https://example.com, Accept: application/json
curl -H 'Accept: application/json' 'https://example.com'

POST JSON

POST https://api.example.com with {"name":"Ada"}
curl -X POST -H 'Content-Type: application/json' --data '{"name":"Ada"}' 'https://api.example.com'

Frequently asked questions

Does it set the Content-Type automatically?

Yes. A JSON body adds application/json and a form body adds application/x-www-form-urlencoded, unless you already supplied a Content-Type header yourself.

How are values with spaces or quotes handled?

Every header, body and URL is wrapped in single quotes with embedded single quotes escaped, so the command pastes safely into a POSIX shell like bash or zsh.

What is the difference between raw, JSON and form bodies?

Raw and JSON send the body with --data, while form uses --data-urlencode. JSON and form also set a matching Content-Type for you.

What do the -k, -L and compressed options do?

-k skips TLS certificate verification, -L follows redirects, and --compressed requests a gzip or brotli encoded response that curl decompresses.

Is anything sent to a server?

No. The command is assembled entirely in your browser, so your URL, headers and body never leave your device.

Related tools