Logo

cURL Command Builder

by MafLabs
Build, format, copy specific parts, and share free without login
0 bytes
Ready
INPUT
Query Params
Headers
Auth
Body
Options
FORMATTED OUTPUT
1

How to use the cURL Command Builder

Our online cURL builder lets you visually construct complex HTTP requests and generates perfectly formatted curl shell commands for your terminal. Select your HTTP method, enter the API URL, add headers or query parameters, and copy the output directly into your terminal.

Need to actually run and test the API directly in your browser instead of generating a command? Use our Online API Tester.

Short Flags Reference

Worked Examples

Example 1: Sending JSON data

To send a JSON payload, you need to set the Content-Type header to application/json and pass the data using the -d flag. Our tool formats this automatically when you select "JSON" as the Body Type.

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

Example 2: Basic Authentication

When an API requires a username and password, you use the -u flag. Simply fill out the "Basic" tab in the Auth section.

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

Frequently Asked Questions

What is the difference between Bash, CMD, and PowerShell modes?

Different terminals use different characters for multi-line commands and escaping. Bash uses backslashes (\), Windows CMD uses carets (^), and PowerShell uses backticks (`). Selecting the right mode ensures your command copies and pastes flawlessly.

Is my data private?

Yes! The cURL generator runs entirely in your browser using JavaScript. We don't save or log your API keys, URLs, or payloads.

Copied to clipboard!