curl Command Generator — Build & Decode curl Requests

Stop hunting for the right curl flags. Pick the method, headers, body and auth and get the exact command — with every flag explained. Or paste a curl command to decode it. Everything stays in your browser.

Your command

Or: decode a curl command

Paste any curl command — every flag gets explained.

The shape of a curl request

Every curl call is the same skeleton: an optional method (-X POST), zero or more headers (-H 'Header: value'), an optional body (-d '…'), some flags, and the URL last. curl https://example.com with nothing else is a plain GET.

The two that confuse people

Gotchas worth knowing

Frequently asked questions

How do I send a POST request with JSON using curl?

curl -X POST -H 'Content-Type: application/json' -d '{"name":"Ada"}' https://api.example.com. The header tells the server it's JSON; -d carries the body.

How do I add a bearer token to a curl request?

Add the header -H 'Authorization: Bearer YOUR_TOKEN'. The builder above does this when you fill in the bearer token field.

What does curl -i do?

-i includes the response's HTTP headers in the output, so you can see the status code and headers along with the body. Use -v to also see the request you sent.

Why does my curl POST get sent as form data?

Because -d defaults to application/x-www-form-urlencoded. Add -H 'Content-Type: application/json' to send JSON instead.

Working in the shell? See the tar, find and rsync generators, or all tools on the home page.