Build curl

Build a shell-safe curl command with URL, method, headers, authentication, and body.

freeworks offlinenothing uploaded
ToolcURL Builder
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

URL, method, query, headers, cookies, multipart fields, and body data are shell-quoted and assembled into curl options. The preview emits text and does not send a request.

  • GET and HTTPS are safe inspection defaults.
  • Explicit flags expose redirect and TLS behavior.

Worked example

POST JSON to an API endpoint
Build a cURL command with POST method, JSON body, and Content-Type header
Input
											URL: https://api.example.com/users
Method: POST
Body: {"name": "John"}
Content type: application/json
										
Output
												Command: curl \
  -X POST \
  https://api.example.com/users \
  -H 'Content-Type: application/json' \
  -d '{"name": "John"}' \
  -L
Command one line: curl -X POST https://api.example.com/users -H 'Content-Type: application/json' -d '{"name": "John"}' -L
Command parts: curl, -X, POST, https://api.example.com/users, -H, 'Content-Type: application/json', -d, '{"name": "John"}', -L
											

When to use this

API debugging, runbooks, and CI webhook calls build curl commands.

Edge cases

  • Shell metacharacters in tokens need quoting.
  • Multipart file paths differ from literal field values.
  • Following redirects can change method or expose credentials.

References