Skip to main content

cURL Builder

Build a cURL command locally with method, query parameters, headers, body, and authentication.

  • Clipboard
  • Export

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Method

One parameter per line: key=value

One header per line: Name: value

Follow redirects

Was this tool useful?

How does this tool work?

Build a complete cURL command locally with methods, parameters, headers, request bodies, and authentication.

This generator assembles a command without sending a request. The URL must be absolute and use HTTP or HTTPS. Enter query parameters as key=value lines; they are appended to the existing query with appropriate encoding. Repeated keys remain separate parameters. Headers use Name: value. For names that match without case sensitivity, the last value replaces the previous one.

Commands use POSIX shell quoting, including apostrophe escaping. They suit shells such as sh or bash rather than automatically working in PowerShell or cmd. HEAD produces --head. A JSON body is checked for syntax and receives Content-Type: application/json unless you supplied that header already. Text uses --data-raw, while form mode adds --data-urlencode for each line. It does not build multipart file uploads.

Redirect, compression and TLS verification options are written into the command. --compressed requests a compressed response and lets cURL decode it; it does not compress your outgoing body. --insecure disables certificate verification and can hide a real problem. Bearer tokens or usernames and passwords appear in plain text in the generated command. Copying or running it in a terminal can expose them through history or logs.

How to use this tool

  1. Describe the call

    Choose a method and HTTP(S) URL, then add one parameter or header per line. Do not pre-encode a space as %20 in a value the tool will encode.

  2. Set the body and options

    Choose no body, JSON, text or form fields. Check authentication and leave TLS verification enabled for normal use.

  3. Review the POSIX command

    Generate and copy or download request.sh. Inspect the final URL and options before deliberately executing it in a compatible terminal.

Use cases

Test an API quickly

Create a reproducible terminal command for checking a REST endpoint.

Document a request

Produce a readable cURL example for technical documentation or onboarding.

Debug an integration

Compare methods, headers, parameters, and request bodies during troubleshooting.

Examples

Keep an existing query

The filter follows page=1 and the space becomes + in the query. No request is sent to produce this output.

Input

GET https://example.com/api?page=1; q=hello world

Result

curl 'https://example.com/api?page=1&q=hello+world'

Prepare a JSON body

The body is checked and retained in --data-raw. Content-Type is added automatically and POST appears explicitly.

Input

POST https://example.com/api; JSON {"name":"Ada"}

Result

curl -X POST -H 'Content-Type: application/json' --data-raw '{"name":"Ada"}' 'https://example.com/api'

Tips and best practices

  • Use dummy values in commands for tickets, documentation or screenshots. Local processing does not protect a secret you subsequently share.
  • Use the API request builder to also generate Fetch and Axios from one configuration; this builder focuses on cURL options.
  • A redirect can lead to a different host; review the URL and redirect option before sending authentication.

Sources and references

Frequently asked questions

Does generating contact the server?

No. It only produces a command string. Networking occurs if you later execute that command in your environment.

Will the command work in PowerShell?

It is quoted for a POSIX shell. PowerShell and cmd have different quoting and command rules; use a compatible environment or adapt the command.

Can I upload a multipart file?

Not with this form mode. It generates --data-urlencode for text fields, without the -F arguments and files needed for multipart uploads.

Why avoid --insecure?

It disables TLS certificate verification. It does not fix an invalid chain of trust and should remain an explicit diagnostic choice rather than a default setting.

Related tools

Tools similar or complementary to this one.

Similar tools

Build a complete HTTP API request with method, URL, parameters, headers, and body.

DevelopmentUse this tool

Build custom HTTP headers and get output ready to use in your requests.

DevelopmentUse this tool

Format, minify, and validate JSON to make it easier to read or more compact.

DevelopmentFeaturedUse this tool