Convert cURL commands to JSON
Paste any curl command, including Copy as cURL straight from Chrome, Firefox, or Edge devtools, and get a clean JSON representation of the request: method, URL, headers, body, auth, and cookies.
cURL command you want to convert to JSON
Keys like headers, body, or auth appear only when the curl command sets them. Converts live as you type.
How to copy a request as cURL from your browser
The most common workflow: you debug a request in devtools, then want it as JSON. Grab it like this:
Chrome or Edge
- Open devtools (F12) and go to the Network tab.
- Reproduce the request (reload the page or trigger the API call).
- Right-click the request โ Copy โ Copy as cURL.
- Paste it above: multi-line commands,
$'...'quoting, and\continuations all work.
Firefox
- Open the Network tab in devtools.
- Right-click the request โ Copy โ Copy as cURL.
Want to run the command first and inspect the response? Use the free cURL Tester, then convert it to JSON here. Need Python instead? Try the cURL to Python converter.
Why convert cURL to JSON?
A curl command is a string, which makes it hard to store, diff, or feed into other tools. JSON is the native format for HTTP clients, API gateways, and config-driven pipelines. Converting a captured curl command to JSON makes the request a first-class data object.
- Import into HTTP clients: Postman, Insomnia, and REST clients all speak JSON; skip the manual re-entry of headers and auth.
- Config-driven pipelines: drop the request into a JSON config consumed by Ansible, Terraform
httpdata sources, or CI health checks. - Request logging & audit: store exactly what was sent in a structured, searchable format.
- Diffing environments: compare staging vs production requests key by key instead of squinting at two one-liners.
- Polyglot friendly: every language parses JSON; a shell command only a shell understands.
What the converter understands
-X, --request: HTTP method (POST is inferred when data is present)-H, --header: headers object (repeatable), plus-A(User-Agent) and-e(Referer)-d, --data, --data-raw, --data-binary, --data-urlencode, --json: JSON bodies stay structured objects; form data becomes a key/value object-F, --form: multipart uploads (@filepaths listed underfiles)-u, --user:auth: {user, password}-b, --cookie: cookies object-G: moves data intoparams-k,-m,-x:verify: false,timeout,proxies- Line continuations (
\), single/double quotes, and$'...'ANSI-C quoting from devtools
Unknown flags are skipped and listed in a warnings array in the output, so nothing fails silently.
Frequently asked questions
What exactly does the JSON contain?
method and url are always present; everything else (headers, body, cookies, auth, params, form/files, timeout, proxies, verify) appears only when the curl command sets it. JSON request bodies are kept as structured objects, not escaped strings.
Does it handle headers, cookies, and authentication?
Yes. -H headers, -b cookies, and -u Basic auth all convert to their JSON equivalents.
Why does Chrome's Copy as cURL look so odd?
Chrome wraps header values in ANSI-C quoting ($'...') and breaks the command across lines with backslashes so it pastes safely into a terminal. The converter parses all of that, so just paste it as-is.
Is my command uploaded anywhere?
No. Conversion is pure client-side JavaScript, so tokens with API keys or passwords never leave your machine.
Related free tools
cURL to Python Converter (sibling tool) ยท cURL Tester (run a command live) ยท JSON Formatter & Validator (inspect the output)
๐ Need an IP to whitelist?
Get a dedicated static EU outbound IP for Banks, payments, EHRs, APIs, AI.