cURL to JSON Converter
Paste a cURL command. Get the request structured as JSON.
curl command and hit "Convert" — we will break it into a JSON objectPaste cURLWhat this tool does
Copied a cURL command from your terminal history, a Stack Overflow answer, or a vendor's API docs and need to turn it into something your app or another tool can consume? This converter pulls the URL, method, headers, auth, query parameters, and body out of the cURL command and emits a clean JSON object describing the whole request.
The parser runs 100% in your browser — your cURL command, any API keys or tokens in the headers, and the body payload never leave your machine. That matters because cURL commands from real work often contain bearer tokens, cookies, or session IDs you would not want leaving your laptop. Everything here is JavaScript, same as any other browser-side tool.
Supports line continuations (\), single and double quotes, all the common flags (-X, --request, -H, --header, -d, --data, --data-raw, --data-urlencode, -u, --user), and JSON bodies — if the body is valid JSON we parse it and emit it as a nested object rather than a string.
How to use it
Three steps. Works with cURL commands from Chrome DevTools, Postman export, Stack Overflow, or wherever.
Paste the cURL command
Drop your command into the left editor. Multi-line (with \ continuations) is fine. You can paste straight from Chrome DevTools' Copy as cURL — the extra -H flags for browser headers parse cleanly.
If you are grabbing a request from a running session, remember the command likely contains an Authorization header with a live token. The parser runs locally so the token never goes over the wire — but still rotate it if you share the JSON output with someone else.
Hit Convert
Click the green Convert button. The parser reads the command and builds a JSON object with the request broken down: method, url, queryParams, headers, auth, body (parsed if the payload is JSON), and bodyRaw (the original string).
Use the JSON
Copy the output into a test fixture, a Postman import, an OpenAPI example, a retry script, or anywhere else you need the request captured as data. No rebuild, no command-line tools.
When this actually saves time
Turning DevTools cURL into Postman requests
Chrome's <strong>Copy as cURL</strong> dumps a huge one-liner. Paste it here, grab the structured JSON, and rebuild the request in Postman, Insomnia, or a code template without hand-picking flags.
Migrating a shell script to code
A legacy shell script has cURL calls with hard-coded headers and body. Convert each one to JSON, then regenerate equivalent HTTP client calls in Python, Go, or TypeScript without transcription errors.
Building test fixtures
Capture real request shapes from your browser, convert to JSON, drop them as fixtures in your integration tests or mock server. The request shape matches production exactly.
Writing API documentation
Vendors hand you a cURL example. Convert it to JSON and embed the broken-down request in your internal docs or OpenAPI examples — far more readable than the raw curl string.
Common questions
Is my cURL command sent anywhere?
No. The parser runs entirely in your browser as JavaScript. Nothing about the command — URL, headers, auth tokens, body payload — is sent to a server. You can confirm by opening DevTools' Network tab and hitting Convert — zero requests.
Does it handle Chrome's "Copy as cURL" output?
Yes. Chrome emits long one-liners with a -H flag per browser header and backslash line continuations. All of that parses correctly. Same for Firefox's "Copy as cURL" and Safari's equivalent.
What about --data-urlencode and form-encoded bodies?
Recognised. --data-urlencode key=value pairs are collected into the body as an object. For Content-Type: application/x-www-form-urlencoded payloads with a single -d flag, the body string is also URL-decoded into an object so you can see the form fields.
Does it handle JSON bodies properly?
Yes. If the body payload parses as valid JSON (per the RFC 8259 spec), the output's body key holds the parsed object/array. The original raw string is kept in bodyRaw in case you need it.
What flags does it understand?
The common ones: -X/--request (method), -H/--header, -d/--data/--data-raw/--data-binary/--data-urlencode, -u/--user (basic auth), -b/--cookie. Flags it does not recognise (like --insecure, -v) are collected into an options array so you can see what was dropped.
Can I use it for very long commands?
Yes — the parser handles multi-kilobyte commands without issue. Since everything is local, there is no upload, no network latency, no rate limit.
Related tools
If you are wrangling HTTP requests and JSON, these pair well: