JSON to cURL Converter

Paste a JSON body and get a runnable curl command — quoted, escaped, and ready to paste into your terminal.

Input

Waiting for input
1

Output

1

Instant

Runs entirely in your browser — no upload, no wait.

100% private

Your JSON never leaves the tab. Nothing is logged.

No signup

Free, unlimited, no account required.

Why generated curl beats hand-written

Manually escaping a JSON body for curl means counting quotes, balancing braces inside single-quoted strings, and remembering the Content-Type header. The generator does it deterministically every time.

How to use

1. Paste the JSON body. 2. Set the URL and method (POST/PUT/PATCH). 3. Add headers (Authorization, Accept, custom). 4. Copy the generated curl line.

The output uses single-quoted heredoc-style escaping that works in bash, zsh, and most CI shells.

curl -X POST 'https://api.example.com/users' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer $TOKEN' \
  -d '{
    "name": "Ada",
    "role": "admin"
  }'

Windows and PowerShell variants

Bash escaping does not work in cmd.exe or PowerShell. The tool emits a separate variant that uses double quotes with backtick escaping for PowerShell, plus a curl.exe-friendly cmd version.

Headers and auth helpers

Common header presets: Bearer token, Basic auth, API key in header, multipart form. The tool reminds you when a body needs Content-Length or Transfer-Encoding: chunked.

Privacy

Conversion runs locally. Your JSON, URL, and headers never leave your browser.

Related tools

Frequently asked questions