cURL Command Generator

Build a shell-safe cURL command from a URL, method, headers and optional body.

Free No sign-up Runs in your browser

Use one Header: value per line. Maximum 50 headers and 100 KB.

Maximum body size: 100 KB. JSON must be valid.

Generated locally. Nothing is sent or executed.

Result

Your result will appear here

cURL Command Generator

Build a command for a POSIX shell from a URL, method, headers and optional body.

Common uses

  • Draft a cURL example for API documentation
  • Convert a small request into a reusable shell command
  • Include response headers while troubleshooting a request

How it works

How to use cURL Command Generator

Enter the request URL

Use an absolute HTTP or HTTPS URL. Select the request method and add any headers the endpoint requires.

Add an optional body and timeout

Choose raw text or valid JSON for POST, PUT, PATCH, DELETE or another request that needs a body. HEAD requests cannot include a body. JSON adds a Content-Type header unless you supplied one. Set a timeout from 1 to 120 seconds.

Review and copy the command

The tool creates POSIX shell text only. Review the URL, headers and body, then run it yourself if appropriate. It never makes the request.

FAQ

Good to know

How do I use cURL Command Generator?

1. Enter the request URL: Use an absolute HTTP or HTTPS URL. Select the request method and add any headers the endpoint requires. 2. Add an optional body and timeout: Choose raw text or valid JSON for POST, PUT, PATCH, DELETE or another request that needs a body. HEAD requests cannot include a body. JSON adds a Content-Type header unless you supplied one. Set a timeout from 1 to 120 seconds. 3. Review and copy the command: The tool creates POSIX shell text only. Review the URL, headers and body, then run it yourself if appropriate. It never makes the request.

Which methods are available?

GET, HEAD, POST, PUT, PATCH and DELETE.

How are quotes and body text handled?

Each argument is enclosed in POSIX shell single quotes, with embedded quotes escaped safely. Bodies use --data-raw so a leading @ is sent as text rather than treated as a file.

Does this run the command?

No. It only creates text in your browser. Review the command and destination before running it in your own terminal.

What are the limits?

HTTP(S) URLs only; at most 50 headers, 100 KB of headers and 100 KB of body; timeout from 1 to 120 seconds. Credentials in URLs and line breaks in header values are rejected.