JSON & API

cURL Command Builder

Build cURL commands visually — select method, URL, headers and request body, and get the complete ready-to-run cURL command without memorising flags.

Open cURL Builder →
Looks like you're using an ad blocker. Devbin is free — ads help keep it running.

What is the cURL Command Builder?

cURL is a command-line tool for making HTTP requests, available on macOS, Linux and Windows. Its syntax can be complex — this builder lets you fill in the URL, method, headers and body through a form and generates the complete curl command ready to copy and run in your terminal.

How to Use It

1

Open the tool

Go to JSON & API and scroll to the cURL Command Builder.

2

Enter the URL

Type the full API endpoint URL, e.g. https://api.example.com/users.

3

Set method and headers

Select GET, POST, PUT, DELETE or PATCH. Add headers like Content-Type: application/json or Authorization: Bearer token.

4

Add body and copy

For POST/PUT, add the JSON request body. Copy the generated curl command and run it in your terminal.

Key cURL Flags Explained

-X POST — Sets the HTTP method. -H "Header: Value" — Adds a request header. -d '{"key":"val"}' — Sets the request body. -s — Silent mode (no progress output). -v — Verbose mode (shows request and response headers). -o file.json — Saves the response to a file.

Pro Tips

💡Add | python3 -m json.tool at the end to pretty-print JSON responses directly in the terminal.
💡Store API tokens in a shell variable (TOKEN="abc123") and reference with $TOKEN in your curl command for better security in shell history.
💡Use -s -o /dev/null -w "%{http_code}" to check only the HTTP status code without showing the response body.

Frequently Asked Questions

What is cURL?
A command-line tool for making HTTP (and other protocol) requests. Available by default on macOS and Linux; installable on Windows. Widely used for API testing and automation scripts.
What does -X POST do?
Sets the HTTP method to POST. Without -X, cURL defaults to GET. Other methods: -X PUT, -X DELETE, -X PATCH.
What does -H do?
Adds a request header. Use multiple -H flags for multiple headers: -H "Content-Type: application/json" -H "Authorization: Bearer token".
What does -d do?
Sets the request body. When -d is used, cURL automatically uses POST unless -X specifies a different method.

Build your cURL command now

Open the cURL Builder and generate any HTTP request command without memorising flags.

Open cURL Builder →