cURL Generator
Runs in browserGenerate cURL commands from method, URL, headers, and body instantly.
Build cURL commands from request data — method, URL, headers, body, and auth. Copy the generated command for use in terminal, CI, or API documentation.
cURL Generator tool
curl \ 'https://api.example.com/users'
🔒 Runs in your browser · No uploads · Your data never leaves your device
How to use
Set method and URL
Pick GET, POST, PUT, PATCH, or DELETE and enter the target URL.
Add headers and auth
Add custom headers and optionally configure Bearer token or Basic auth.
Set body (POST/PUT/PATCH)
Paste JSON or raw body content for requests that send data.
Copy command
Copy the generated cURL command and run it in your terminal.
Common use cases
- Building cURL commands for API documentation — Generate ready-to-run cURL examples for your API docs with the correct headers, method, and body format.
- Testing an endpoint quickly from the terminal — Construct a cURL command with auth headers and JSON body without remembering the exact syntax.
Examples
POST with Bearer auth
Create a user with JSON body and Bearer token.
Outputcurl -X POST -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{"name":"Alice"}' 'https://api.example.com/users'
Frequently asked questions
- Does this send any requests?
- No. This tool only generates the cURL command text. No requests are made from this page.
- Can I convert the output to JavaScript?
- Yes — paste the generated cURL into the cURL to Fetch converter to get a JavaScript fetch() snippet.
Key concepts
- cURL
- A command-line tool for transferring data with URLs — widely used to test APIs and HTTP endpoints from the terminal.
- Bearer token
- An access token passed in the Authorization header as 'Bearer <token>' to authenticate API requests.
Related tools
You might find these useful too.
- HTTP Request Builder
Build HTTP requests visually and copy as cURL or fetch().
Open - cURL to Fetch Converter
Convert cURL commands to Fetch, Axios, or Node.js instantly.
Open - Webhook Tester
Generate a temp webhook URL to receive and inspect HTTP requests in real time.
Open - CORS Tester
Test CORS configuration for any API endpoint — preflight, headers, pass/fail.
Open