cURL Command Builder

Build curl commands interactively — select method, add headers, set auth, and copy the result

  1. Home
  2. /
  3. cURL Builder

Request

Options

Generated cURL Command

curl --request GET \
  --url https://api.example.com/data \
  --header 'Accept: application/json'

Method

GET

Headers

0

Flags

0

What Is cURL?

cURL (Client URL) is a command-line tool and library for transferring data with URLs. It supports a wide range of protocols including HTTP, HTTPS, FTP, SFTP, and many more. cURL is built into most operating systems and is an essential tool for developers, system administrators, and anyone who needs to interact with APIs or web services from the command line.

With over 200 command-line options, cURL can handle virtually any data transfer scenario. This builder helps you construct the most common HTTP request patterns without memorizing all the flags.

How to Use This Builder

  1. Select the HTTP method — Choose GET, POST, PUT, PATCH, DELETE, HEAD, or OPTIONS.
  2. Enter the URL — Paste the full URL including protocol (https://).
  3. Add query parameters — Use the key-value pairs to build query string parameters.
  4. Set headers — Add custom headers like Authorization, Content-Type, or Accept.
  5. Provide a body — For POST, PUT, and PATCH methods, enter the request body and select the Content-Type.
  6. Configure authentication — Choose Basic Auth or Bearer Token if needed.
  7. Toggle options — Enable follow redirects, verbose mode, or other cURL flags.
  8. Copy the command — Click the Copy button to copy the generated curl command to your clipboard.

Common cURL Examples

GET request with headers

curl --request GET \
  --url 'https://api.github.com/repos/curl/curl' \
  --header 'Accept: application/vnd.github+json' \
  --header 'User-Agent: MyApp'

POST with JSON body and Bearer auth

curl --request POST \
  --url https://api.example.com/users \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIs...' \
  --header 'Content-Type: application/json' \
  --data '{"name":"John","email":"john@example.com"}'

Upload file with form data

curl --request POST \
  --url https://api.example.com/upload \
  --form 'file=@/path/to/document.pdf' \
  --form 'description=Monthly report'

FAQs

Is cURL installed on my system?

cURL comes pre-installed on macOS and most Linux distributions. Windows 10+ includes curl.exe in the command prompt. You can check by running curl --version in your terminal.

What is the difference between -X, --request, and --data?

-X or --request specifies the HTTP method. --data sends data in the request body (typically for POST). cURL automatically switches to POST when you use --data even without specifying -X POST.

How do I debug a curl command?

Add -v or --verbose to see request headers, response headers, and connection details. For even more detail, use --trace or --trace-ascii to see the raw bytes being sent and received.

Can I use curl with GraphQL?

Yes. Send a POST request with Content-Type: application/json and a JSON body containing {"query": "..."}. Many GraphQL APIs also accept Accept: application/json.

Frequently Asked Questions

What does this tool do?

This tool helps web developers build, test, and debug common web components and configurations directly in their browser.

How do I use this tool?

Configure your options and click the generate or process button. The output is displayed and can be copied or downloaded.

Is my data sent to a server?

No. All processing is performed locally in your browser. Your data never leaves your device.

Can I use the output in production?

Yes, but always review and test the output for your specific requirements before deploying to production.

Is this tool free to use?

Yes. This tool is completely free with no usage limits or registration required.

Last updated: 24 Jun 2026