cURL Command Builder
Build a quoted cURL command for Bash or zsh. Review and export it without sending a request.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Build a quoted POSIX-shell cURL command from an HTTP URL, method, headers and optional literal text body without sending or executing it.
How to use it
- 1Choose the HTTP method and add a complete HTTP/HTTPS URL.
- 2Optionally supply header lines and deliberately include a text body.
- 3Build and review the command, then copy or download it for your own supported shell.
Example
- Input
- GET https://api.example.com/items
- Output
- curl --disable --globoff --request 'GET' --url 'https://api.example.com/items'
Bash/zsh-style quoting; not PowerShell/CMD syntax and no request is executed.
What happens to your data
URLs, headers and body text stay in tab memory; no destination is contacted. Optional fixed usage measurements omit all supplied values and generated command text.
Last updated November 2026
Turn an HTTP request description into a cURL command you can inspect, copy or download. Choose a method, enter a complete URL and optionally add headers and a literal text body. The cURL Command Builder quotes each supplied argument for a POSIX shell such as Bash or zsh, so punctuation and spaces remain data. It does not execute the command, contact the server, check credentials or parse an existing shell command. The output is for deliberate use in your own terminal.
How it works
The generated command starts with curl --disable --globoff. curl requires --disable as its first option to avoid loading its ordinary config file; --globoff turns off curl’s bracket and brace URL expansion. The URL is passed through the dedicated --url option. GET is the default, while HEAD uses --head. POST, PUT, PATCH, DELETE and OPTIONS can include a deliberately selected text body. No automatic redirect following or TLS-verification bypass is added. These are explicit builder defaults, not a claim that any supplied destination is trustworthy.
Arguments are POSIX single-quoted, with embedded apostrophes represented by adjacent quoted segments. Shell substitutions, dollar signs, backticks and semicolons in a quoted value remain literal text under the supported shell grammar. This quoting is not for Windows Command Prompt or PowerShell. The tool never interprets a pasted command, expands environment variables, reads files or runs a subprocess. URL validation uses the browser’s URL parser and may normalize a host, port or Unicode spelling.
Headers use one name-and-value pair per line. Names follow the HTTP token grammar. Duplicate names retain their order; the remote server determines their meaning. An empty field value uses curl’s Name; syntax, which sends an empty header instead of deleting curl’s default header. Host, Content-Length and Transfer-Encoding are left to curl rather than accepted as manually supplied headers. Embedded line breaks and unsupported controls in a header are rejected. Body text uses --data-raw, so an initial @ is literal text and never a file instruction. Explicitly selected empty bodies are retained. For JSON, add Content-Type: application/json yourself; without it curl applies its normal data content type.
Review a command before using it. An HTTP request can create, alter or delete data, and credentials in copied commands can be exposed through shell history, files or chat. This builder cannot prove authorization, server behavior, API compatibility or whether a response will be successful. It does not test a connection, follow redirects, upload a file or load browser cookies. Copying the output is not the same as sending a request.
Limits are 8,192 input URL characters, 100 header lines, 32,768 total header characters, 8,192 characters in one header value and 64 KiB of UTF-8 body text. The generated command is bounded to 512 KiB. Inputs containing malformed Unicode, NUL or unsupported controls are rejected. Editing a field removes old output; Clear cancels any unfinished generation. Fields remain in tab memory, and optional fixed usage measurements exclude URL, header and body values.
Worked example: A simple GET request
- Input
- GET https://api.example.com/items; no headers or body
- Result
- curl --disable --globoff --request 'GET' --url 'https://api.example.com/items'
Independent Python shlex parsing recovers each intended argument. Nothing is sent by the tool.
Common use cases
- Prepare a reviewable API request without making a network call from the browser.
- Keep a literal leading @ in a text body instead of reading a local file.
- Build commands containing apostrophes, spaces or shell-shaped text with explicit POSIX quoting.
- Share a request example after deliberately removing private credentials from the generated text.
Frequently asked questions
Does the cURL generator send my HTTP request?+
No. It produces command text only. Neither the supplied URL nor any remote API is contacted. The browser does not execute the command or verify authentication.
Can I paste this into PowerShell or Command Prompt?+
The output targets a POSIX shell such as Bash or zsh. PowerShell and Windows Command Prompt have different quoting rules, so the output is not presented as compatible with them.
What happens to a body starting with @?+
The builder uses --data-raw, whose argument has no special @ file-reading interpretation. Your supplied text is one quoted argument. An explicitly selected empty body is also retained.
Why does the command start with --disable and --globoff?+
The first option prevents curl from loading its ordinary config file. --globoff disables curl’s URL bracket/brace expansion. The builder does not add --insecure or automatically follow redirects.
How are empty or repeated headers handled?+
Repeated headers remain separate arguments in the supplied order. A blank value uses curl’s explicit-empty Name; syntax. Let curl manage Host, Content-Length and Transfer-Encoding; these manual headers are rejected.
Are private tokens or body data uploaded?+
No. The generated command and inputs stay in this tab unless you copy or download them. Optional fixed usage measurements omit field values. After export, protect the command yourself because shell history and shared files may retain credentials.
Related tools
HTTP Header Inspector & Compare
Compare pasted headers and check CORS origins, credentials and preflights without fetching a URL.
URL Parser
Break a URL into protocol, host, path, and query parameters.
JSON Formatter & Validator
Format, validate, and minify JSON with exact line errors, a searchable tree, and private processing.
Query String ⇄ JSON
Convert URL query strings to JSON and back.