Required headers
Most JSON APIs need Content-Type: application/json. The converter also supports curl --json, which sets JSON-oriented headers and request body behavior.
Convert cURL POST requests with JSON bodies into structured JSON and code for Python, JavaScript, Node.js, PHP, Go, Java, C#, Ruby, Swift, and Rust.
Try JSON POST ConversionMost JSON APIs need Content-Type: application/json. The converter also supports curl --json, which sets JSON-oriented headers and request body behavior.
When the payload is valid JSON, output keeps it as an object instead of a raw string so generated code can use native JSON helpers where possible.
If conversion keeps the body as text, check for broken quoting, trailing commas, shell variables, or copied smart quotes in the original command.
curl --json '{"name":"Ada","active":true}' https://api.example.com/users
Yes. The converter treats --json as a JSON request body and adds JSON-oriented headers when they are missing.
The body may not be valid JSON after shell parsing, so the converter keeps the original text instead of guessing.