cURL Generator

Runs in browser

Generate 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

  1. Set method and URL

    Pick GET, POST, PUT, PATCH, or DELETE and enter the target URL.

  2. Add headers and auth

    Add custom headers and optionally configure Bearer token or Basic auth.

  3. Set body (POST/PUT/PATCH)

    Paste JSON or raw body content for requests that send data.

  4. Copy command

    Copy the generated cURL command and run it in your terminal.

Common use cases

  • Building cURL commands for API documentationGenerate ready-to-run cURL examples for your API docs with the correct headers, method, and body format.
  • Testing an endpoint quickly from the terminalConstruct 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.

    Output
    curl -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.

You might find these useful too.

More api tools