cURL Builder

Runs in browser

Build cURL commands visually

Request
Headers
Options

Import cURL Command

Paste a cURL command to populate the form.

How to Use

Fill in request details or import an existing cURL command.

You will see:

  • Real-time cURL Command
  • Syntax Highlighting
  • One-click Copy
Generated cURL
GET 87 chars
curl \
  -L \
  -H 'Content-Type: application/json' \
  'https://api.example.com/users'

Quick Reference

-X HTTP method
-H Header
-d Data/body
-L Follow redirects
-k Ignore SSL
-v Verbose

About cURL

cURL (Client URL) is a command-line tool for transferring data with URLs. It's essential for API development, testing, debugging, and automation. cURL supports various protocols including HTTP, HTTPS, FTP, and more, making it a versatile tool for developers and system administrators.

Basic Syntax

curl [options] [URL]

Common HTTP Methods

GET Request (Default)

curl https://api.example.com/users

POST Request

curl -X POST https://api.example.com/users \
  -H "Content-Type: application/json" \
  -d '{"name": "John", "email": "john@example.com"}'

PUT Request

curl -X PUT https://api.example.com/users/1 \
  -H "Content-Type: application/json" \
  -d '{"name": "John Updated"}'

DELETE Request

curl -X DELETE https://api.example.com/users/1

Essential Options

-X, --request

Specify HTTP method (GET, POST, PUT, DELETE, etc.)

-H, --header

Add HTTP header (can be used multiple times)

-d, --data

Send data in request body

-L, --location

Follow redirects automatically

-v, --verbose

Show detailed request/response information

-k, --insecure

Allow insecure SSL connections (for testing only)

-o, --output

Write output to file instead of stdout

Authentication Methods

Bearer Token

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.example.com/protected

Basic Auth

curl -u username:password \
  https://api.example.com/protected

API Key

curl -H "X-API-Key: YOUR_API_KEY" \
  https://api.example.com/data

Working with JSON

Send JSON Data

curl -X POST https://api.example.com/data \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

Pretty print response with jq:

curl https://api.example.com/data | jq .

File Operations

Upload File

curl -X POST https://api.example.com/upload \
  -F "file=@/path/to/file.pdf"

Download File

curl -O https://example.com/file.pdf
# Or with custom name
curl -o myfile.pdf https://example.com/file.pdf

💡 Pro Tips

  • Use -w "\n" to add newline after response
  • Use -s (silent) to hide progress meter
  • Use --compressed to handle gzip responses automatically
  • Use -I to fetch headers only (HEAD request)
  • Save common requests to files and use -K to load config files
  • Use --max-time to set request timeout