cURL Command Generator

Endpoint

Endpoint and method

Your URL, headers, credentials and body stay in this browser tab. They are not sent to our servers, placed in the URL or uploaded. Funnel state expires 30 minutes after it is first saved, and closing the tab clears it.

Build a cURL command without sending the endpoint, credentials, headers or body to our server. Choose POSIX output for bash, zsh and WSL, or generate a PowerShell command that calls curl.exe and uses PowerShell quoting and continuation rules.

How to build a cURL command safely

  1. 1

    Choose the method, URL and shell

    Enter a complete HTTP or HTTPS URL. Pick POSIX shell output or PowerShell output before adding request details.

  2. 2

    Add headers and authentication

    Use validated header pairs, a Bearer token or Basic authentication. A manual Authorization header cannot be combined with an authentication mode.

  3. 3

    Choose the body format

    Validate JSON, enter literal raw data or add URL-encoded form fields as separate name/value rows. Literal bodies use `--data-raw`, so a leading `@` is not read as a local file.

  4. 4

    Review before copying

    Check the method, URL, shell, header count and body type. Credential values are hidden in the summary but remain visible in the final command.

  5. 5

    Copy or download

    Copy the command or download a `.sh` or `.ps1` file. Run it only after checking the endpoint, options and any secrets it contains.

What the generator handles

Input Generated cURL syntax
HEAD request --head so cURL expects headers without a response body
Other non-GET methods -X METHOD
Request header One quoted -H argument per header
JSON body --data-raw plus an automatic JSON Content-Type header when one is not supplied
Literal body --data-raw to prevent @filename interpretation
URL-encoded form One --data-urlencode argument per field
Bearer token A quoted Authorization: Bearer ... header
Basic authentication A quoted --user value
Redirects, diagnostics or local TLS testing --location, --verbose or --insecure

POSIX and PowerShell are different targets

The POSIX command uses single-quoted arguments and backslash line continuations for bash, zsh and WSL. A literal single quote is closed, escaped and reopened so the shell passes the original character to cURL.

The PowerShell command calls curl.exe, uses PowerShell single-quote escaping and uses the backtick as its line-continuation character. It is not a cmd.exe command. Windows Command Prompt has different expansion and quoting rules and is deliberately not offered.

Credentials still need care

Browser-local generation prevents this page from receiving your secret, but the final command contains any token, password or sensitive header you entered. A copied command can enter shell history, a downloaded script can remain on disk and process arguments may be visible to other software on the same computer. Prefer short-lived credentials, use placeholders when sharing examples and delete unneeded command files.

Input limits and deliberate exclusions

The generator accepts HTTP and HTTPS URLs without embedded credentials or fragments. It supports up to 30 headers or form fields and a body up to 256 KiB. Header names must use the HTTP token character set, and header values cannot contain line breaks or control characters. GET and HEAD bodies, multipart file uploads and cmd.exe output are not generated.

Frequently Asked Questions

No. The editor and command assembly run in this browser tab. It does not call the endpoint or send the URL, headers, credentials or body to our servers. The request is made only if you later run the generated command.

The multi-page funnel uses this tab’s session storage. Its expiry is fixed at 30 minutes from the first successful save rather than being extended on every page, and Start over removes it. Closing the tab normally clears session storage.

--data-raw sends literal text and disables cURL’s special @filename behavior. That prevents a body beginning with @ from unexpectedly reading a local file when the command runs.

No. Multipart -F and local file references are outside this generator. Build and inspect those commands manually, especially when a command can read a path from your computer.

No. It targets PowerShell and explicitly calls curl.exe. Use the POSIX target in WSL. Classic cmd.exe has separate escaping and variable-expansion behavior, so pasting either multiline target there is unsafe.

Related Tools