๐ŸŒ curl Command Builder

Headers
curl command
curl \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Alice"
}' \
  'https://api.example.com/v1/users'

Fill in an HTTP method, URL, request headers, and request body, and this tool automatically generates the matching curl command. Handy for quickly preparing a correctly shell-escaped curl command while testing or debugging an API.

How to use

  1. Enter the HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD) and URL.
  2. Add any request headers you need.
  3. For POST, PUT, or PATCH, enter a request body โ€” the curl command is generated automatically.

FAQ

Can I run the generated command directly in a terminal?

Yes, it's output with proper single-quote shell escaping, so you can copy and paste it directly into bash/zsh or another Unix shell.

Can I add an Authorization header?

Yes, enter "Authorization" as the header key and something like "Bearer your-token" as the value to generate a command with an auth header.

Can I send a body with a GET request?

No, this tool only shows the body input field for POST, PUT, and PATCH methods.