cURL to JSON Converter
Parse cURL commands into clean structured JSON with method, URL, query params, headers, and body payload.
- 100% free
- Private in browser
- No signup
- No watermarks
Indent:
Parsed JSON Representation
MethodPOST
Headers Count3
Query Params2
Body PayloadPresent
{
"method": "POST",
"url": "https://api.example.com/v1/users?source=web&ref=banner",
"origin": "https://api.example.com",
"pathname": "/v1/users",
"queryParams": {
"source": "web",
"ref": "banner"
},
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiJ9...",
"Content-Type": "application/json",
"Accept": "application/json"
},
"body": {
"name": "Jane Doe",
"email": "[email protected]",
"role": "admin"
},
"rawBody": "{\"name\": \"Jane Doe\", \"email\": \"[email protected]\", \"role\": \"admin\"}"
}Rate this tool
Be the first to rate — helps others and improves this page.
About cURL to JSON Converter
Debugging API calls or importing cURL snippets into Postman, Insomnia, or custom integration pipelines? The cURL to JSON Converter parses command-line cURL strings and converts them into clean, structured JSON schemas. It extracts HTTP methods, target origins, paths, query string parameters, headers, basic authentication credentials, and request bodies. The conversion happens 100% locally in your browser with zero remote logging.
How to use cURL to JSON Converter
- Paste your raw cURL command into the input text box.
- Select your desired indentation format (2 spaces or 4 spaces).
- View the structured JSON output with parsed headers, query parameters, and payload.
- Click Copy JSON to use the structured data in your applications or tests.
Key features
- Parses standard cURL parameters (-X, -H, -d, --data, --json, -u)
- Separates URL origin, pathname, and query parameters into key-value pairs
- Intelligently parses JSON payloads into native nested JSON structures
- Supports line continuation backslashes (\) and quoted strings
- Private client-side execution keeping API keys and auth tokens secure
Frequently asked questions
- Can this tool parse cURL commands with multiline backslashes?
- Yes. Standard shell line continuation backslashes (\) and line breaks are automatically joined and tokenized properly.
- What happens to JSON body payloads passed via -d or --json?
- If the payload is valid JSON, it is parsed directly into native nested JSON objects in the output. If it is raw text or form-encoded, it is preserved as a raw string.
- Are sensitive API tokens and Authorization headers kept secure?
- Yes. All parsing happens entirely on your local machine within the browser sandbox. No data or credentials are sent over any network.
- Does this tool support basic authentication flags like -u user:password?
- Yes. The username and password flags (-u or --user) are extracted into an explicit auth object in the JSON output.
- Can I convert the parsed output to JavaScript fetch() or Python requests?
- Yes. For direct code output in JavaScript, Axios, or Python, check out our companion cURL to Fetch tool linked in the related tools section.