cURL Builder

Request

Headers

Authorization

Generated cURL

Fill in the URL above to generate a cURL command

About the cURL Builder

The cURL Builder turns a structured form into a copy-ready cURL command. Pick the HTTP method, paste the URL, add headers, configure authentication, and drop in a request body — the cURL string is generated live as you type. Use it to teach yourself which cURL flags map to which request elements, to share reproducible curl commands inside bug reports without manually escaping quotes, or to construct a known-good cURL command before pasting it into the cURL-to-Code Converter for translation into 21 languages. Everything runs client-side and nothing you type is sent to our servers; the method, URL, and auth type are kept in the page address (see Privacy below).

Updated: May 8, 2026

How to use the builder

  • Pick the HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) from the dropdown. The corresponding cURL flag (`-X POST`, etc.) is added automatically.
  • Paste the URL, including any query string. A URL without a scheme gets `https://` prepended.
  • Add headers as key/value rows with Add Header. When Bearer or Basic auth is selected, an Authorization header row is skipped so the command has only one.
  • Configure authentication: None, Bearer token, or Basic (username/password). The builder emits the right `-H "Authorization: Bearer ..."` or `-u` flag. For any other scheme, choose None and add an Authorization header row.
  • For POST, PUT, and PATCH, a Request Body box appears. Its text is sent as-is with `-d`, so add the matching Content-Type header yourself (the POST JSON sample shows how).
  • The output panel updates live with the generated cURL command. Click Copy to drop it into your clipboard, or Convert to Code to send it directly to the cURL Converter.

Common use cases

  • Bug repros. Reproduce an API issue with a curl command in a ticket so reviewers can paste-and-run without negotiating shell quoting differences across macOS / Linux / Windows / WSL.
  • API exploration. When working from documentation that gives you only request/response examples, build the curl command in the visual form, hit copy, run it, and iterate.
  • Teaching cURL. Change a form field and watch the matching flag change in the live preview. Useful for onboarding engineers who came from Postman or Insomnia and have not memorized cURL's flag set.
  • CI script generation. Build a curl command in the form, paste into a shell script, and you have a deployable smoke test for an API endpoint without hand-writing the JSON escaping.
  • Pre-step before code conversion. Build the curl command in the form (no escape-quoting headaches), then paste into `/curl-converter/` to get language-specific code in 21 targets.

Privacy and security

The builder is a pure rendering function: form state in, cURL string out, and no request carries your input. Authentication credentials, API tokens, and request bodies you type into the form stay in your browser tab. Only the method, URL, and auth type are mirrored in the URL query string as you type, and the values of common credential URL parameters (a fixed list including api_key, token, client_secret) and user:pass@ in the URL are replaced with REDACTED there and in share links; the request body, bearer tokens, usernames, and passwords are not. Scripts on the page, including ads, can read the page address, and ad requests may send the page address to Google. The body and credentials go into a link only when you click Share, and the button warns you before copying a link that contains them. Convert to Code hands the command to the cURL Converter without putting it in the address bar. Long values are lz-string compressed, which shortens the link but does not encrypt it, so avoid posting share links containing real credentials or customer data to public channels. A shared link stays in the recipient's browser history and in any app the link passes through.

Tips and pitfalls

  • Quoting matters across shells. The builder wraps every value in single quotes and escapes any single quote inside a value, which works in bash, zsh, and most CI runners. PowerShell and the Windows cmd interpret quoting differently — paste into the target shell and verify before depending on it for a CI script.
  • `-d` vs `--data-raw` vs `--data-binary`. `-d` treats a leading `@` as a file to read (stripping its newlines), `--data-raw` sends `@` literally, and `--data-binary` sends file bytes untouched. The builder always emits `-d`, so switch to `--data-raw` by hand if your body starts with `@`.
  • `-F` (multipart) cannot be combined with `-d` (urlencoded) on the same request — they set different Content-Type headers. The builder only emits `-d`; write `-F` flags by hand for multipart uploads.
  • `-L` (follow redirects) is implicit in many higher-level libraries but explicit in cURL. If your downstream language client does not follow redirects (Go net/http does, Node fetch does, Python requests does — but with method downgrade rules), copy the curl behavior into the language port.
  • `-k` / `--insecure` disables certificate verification. Useful for local development against self-signed servers, dangerous in production. The builder has no option for it; add it by hand only for local testing.

Frequently Asked Questions

Why use a builder when I could just type cURL?
For one-liners, typing is faster. For requests with multipart bodies, complex headers, or JSON payloads with many escaped quotes, the visual form is dramatically easier to read and modify — and copy-pasting the result into a ticket reproduces correctly across shells.
Does the builder work offline?
Yes. After the page loads, the builder is fully client-side. Disconnect from the network and you can still construct cURL commands without any external dependency as long as you keep the tab open.
How do I add custom headers?
Click "Add header" in the Headers section, fill in the name and value. The builder emits one `-H "Name: Value"` flag per header in the generated command. For headers with semicolons or special characters, the builder escapes them correctly.
Can I import an existing cURL command?
Not directly in the builder — but the cURL Converter at `/curl-converter/` parses arbitrary cURL commands. To go in the other direction (cURL → builder form), paste into the converter, inspect the parsed request, and recreate it in the builder.
Can I export to languages other than shell?
Yes. Click "Convert to Code" to send the generated cURL command directly to the cURL Converter, which produces equivalent code in 21 languages including Python, JavaScript, Go, Java, Rust, and PHP.
How does the builder handle authentication?
Basic auth produces `-u username:password`. Bearer tokens produce `-H "Authorization: Bearer ..."`. Custom auth (e.g., AWS Signature) requires you to construct the header value yourself and add it via the Headers section.
Can I use the builder for WebSocket or gRPC?
The builder produces standard HTTP(S) cURL commands. For WebSocket use `wscat` or `websocat` instead. For gRPC use `grpcurl`, which mirrors cURL's flag style for gRPC services.
Where does the form data go?
Not to our servers. The builder is a pure function from form state to cURL string. There is no analytics on the form content, no logging, no upload. Only the method, URL (with known credential parameters redacted), and auth type are kept in the URL query string, where scripts on the page, including ads, can read them and ad requests may send the page address to Google; the request body and credentials are not written there while you type. The Share button is opt-in: it adds the body and credentials to the copied link only after warning you, and long values are lz-string compressed, not encrypted.