Free Developer Tool

curl command generator with correct escaping

Pick a method, set the URL, add headers, auth, and a body — and copy a curl command with shell escaping handled correctly, built entirely in your browser.

Headers

Generated command

curl 'https://example.com'

Generated locally — nothing is sent anywhere.

Stop fighting quotes in your curl commands

Writing curl by hand is fine until the request gets real: a JSON body full of double quotes, a header value with spaces, a password with a dollar sign. One wrong quote and the shell mangles the request, the API returns a confusing 400, and you spend ten minutes debugging your escaping instead of your API.

This generator builds the command for you. Choose the method, enter the URL, add headers and query parameters, pick an auth style (Bearer token or basic auth), and paste the body — JSON or form data. The output is a clean, copy-ready curl command with every value escaped correctly for the shell. It is generated locally in your browser, so URLs, tokens, and payloads never leave your machine.

How to build a curl command

  1. 1

    Set method and URL

    Choose GET, POST, PUT, PATCH, or DELETE and enter the request URL, including any query parameters.

  2. 2

    Add headers and auth

    Add headers like Content-Type, and pick Bearer token or basic auth — the right -H or -u flags are generated for you.

  3. 3

    Paste the body

    For POST and PUT requests, paste the JSON or form body. Quotes and special characters are escaped correctly for the shell.

  4. 4

    Copy and run

    Copy the finished command into your terminal, CI script, or runbook. It runs as-is — no quote surgery needed.

curl generator FAQ

Is this curl generator free?

Yes. It is completely free with no signup and no limits.

Are my URLs, tokens, or bodies uploaded?

No. The command is assembled with JavaScript in your browser. API tokens and payloads never leave your machine — which is exactly why you should not build commands with sensitive tokens in server-side tools.

How does it handle quotes in a JSON body?

The body is wrapped in single quotes for the shell, and any single quotes inside it are escaped with the standard '\'' sequence, so the JSON arrives at the server byte-for-byte intact.

Does the generated command work on every shell?

It targets POSIX shells — bash and zsh on Linux and macOS. On Windows, run it in WSL or Git Bash; cmd.exe and PowerShell quote differently.

See every HTTP request, not just the one you crafted

AllStak application monitoring tracks the HTTP requests your services actually make and receive — status codes, latency, and failures — so when a request misbehaves in production you see it without rebuilding it by hand.