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; nothing you type is sent anywhere.

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 — query parameters can be split out into the Query Parameters section so you do not have to hand-encode them.
  • Add headers as key/value rows. Common ones (Authorization, Content-Type, Accept) have shortcut buttons that pre-fill plausible values.
  • Configure authentication: Basic (username/password), Bearer token, or custom Authorization header. The builder emits the right `-u` or `-H "Authorization: ..."` flag.
  • For requests with a body, choose the body type: JSON (auto-sets Content-Type), Form Data (multipart, supports file fields), URL-encoded (application/x-www-form-urlencoded), or Raw (you own the bytes and Content-Type).
  • 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. Hover over each form field to see the cURL flag it produces. 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, no network call to anywhere. Authentication credentials, API tokens, and request bodies you type into the form stay in your browser tab. URL state is only updated when you click Share, and even then via lz-string compression of the form payload (the URL fragment is opaque to casual log readers, though still avoid posting share links containing real customer data to public channels).

Tips and pitfalls

  • Quoting matters across shells. The builder emits double-quoted JSON by default, which works in bash, zsh, fish, 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` and `--data` strip newlines for legacy form-encoded compatibility — use `--data-raw` to preserve line breaks in JSON or text bodies. The builder picks the right variant based on the body type you select.
  • `-F` (multipart) cannot be combined with `-d` (urlencoded) on the same request — they set different Content-Type headers. The builder enforces this by switching the body type radio.
  • `-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 emits a warning banner above the output when -k is enabled.

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.
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?
Nowhere off your device. The builder is a pure function from form state to cURL string. There is no analytics on the form content, no logging, no upload. The Share button is opt-in and uses lz-string-compressed URL encoding to make a sharable link.