cURL to HTTPie Converter — Idiomatic Terminal Commands
Paste a cURL command and get the HTTPie equivalent that humans actually enjoy typing: JSON payloads as key=value and key:=value items instead of escaped --data strings, headers as Name:value tokens, -u credentials mapped to --auth, and non-JSON bodies passed verbatim with --raw. Conversion runs entirely in your browser.
Zero upload, ever
Parsing and code generation run in your browser — URLs, headers, and tokens never touch a server.
Live 100 ms conversion
Output updates as you type or paste, with one-keystroke copy via Cmd/Ctrl + Enter.
Human-readable output
The command HTTPie users would have written by hand — items, not flags.
Paste a cURL command to convert
cURL command
Paste a cURL command — idiomatic code appears here instantly, converted entirely in your browser.
Technical documentation
How cURL maps to HTTPie syntax
HTTPie's whole reason to exist is that API calls should read like English: http POST api.example.com/todos title=Ship done:=false sends JSON with the right Content-Type — no -X, no -H 'Content-Type: application/json', no shell-escaped --data blob. The converter applies each of those translations: the verb becomes a bare argument (omitted entirely for GET, HTTPie's default), every -H flag becomes a Name:value token, and the URL keeps its query string verbatim.
JSON bodies get the deepest translation. A --data-raw '{"title": "Ship it", "done": false}' becomes title='Ship it' done:=false — strings as key=value items, non-strings (numbers, booleans, null, nested arrays and objects) as key:=value with the JSON preserved. HTTPie assembles the object, sets Content-Type: application/json, and serializes it — which is why the converter drops the Content-Type header when items take over. Any JSON body that is not a flat object of scalars (arrays, deeply nested roots) falls back to --raw, HTTPie's escape hatch for verbatim payloads.
Auth, forms, and what maps to what
Basic auth is a first-class citizen in HTTPie: -u user:pass becomes --auth user:pass, and HTTPie sends the Authorization header without you encoding anything. Bearer tokens stay as header tokens (Authorization:'Bearer ...') because that is the idiomatic HTTPie spelling too. Form data (--data 'a=1&b=2' with the urlencoded content type) maps to --raw or to a=form style depending on shape; HTTPie's = signals form fields just as : signals JSON raw values, and the converter keeps the wire format faithful either way.
The flags that disappear are the point: -X vanishes into the bare verb, -H into tokens, -d into items, -s into nothing (HTTPie colorizes and formats responses by default), and --compressed into HTTPie's transparent gzip handling. Flags with no HTTPie equivalent — curl's intricate --resolve, --connect-to, DNS pinning — have no honest translation and simply do not appear; the generated command is the readable core of your request, not a flag-for-flag simulation.
Running, downloading, and streaming with HTTPie
The generated command is complete terminal syntax: install HTTPie (pip install httpie, brew install httpie, or your package manager), paste, and run. Responses arrive syntax-highlighted with headers and body separated by default — the --verbose curl users reach for is effectively always on. Add --download when the endpoint returns a file (HTTPie shows a progress bar and names the output), and --stream for server-sent events and chunked endpoints where curl users would add -N.
For API exploration, the item syntax compounds nicely after conversion: add query parameters as key==value directly in the command, append --json to force JSON for GETs, and use --offline --print=H to preview the exact request HTTPie would send — the local echo of what you just converted. Sessions (--session=name) persist auth and cookies across calls, replacing curl's cookie-jar flag gymnastics with one readable switch.
When to stay with curl (and how this tool respects that)
curl remains the right tool for scripts that must run everywhere — it ships on effectively every Unix-like box, in every container image, and in CI runners where installing HTTPie is friction. HTTPie shines at the interactive end: exploring an API, debugging a webhook, teaching a teammate a request. Converting between them is not choosing a side; it is moving a request description between the tool that scripted it and the tool that displays it best.
This converter keeps the translation conservative for that reason: nothing is invented, nothing is dropped silently, and the wire semantics — method, URL, headers, body bytes — are preserved exactly. When a construct has no HTTPie form, the output says so rather than approximating. The command you paste out of here behaves like the command you pasted in, just in the syntax designed for humans.
Frequently asked questions
Why did my -H 'Content-Type: application/json' disappear?
Because HTTPie sets it automatically when JSON items are used. When your body converts to key=value / key:=value items, HTTPie assembles the JSON object and sends the correct Content-Type itself — an explicit header would be redundant. For non-JSON bodies (XML, plain text, arbitrary payloads) the converter keeps all headers and passes the body through --raw verbatim.
What is the difference between key=value, key:=value, and key==value?
key=value sends a JSON string field, key:=value sends a raw JSON value (number, boolean, null, nested object or array), and key==value appends a URL query parameter. done:=true sends the JSON boolean true while done=true would send the string "true" — the := form is how numbers and booleans survive conversion from your curl JSON body intact.
How does basic auth (-u) convert to HTTPie?
-u user:pass becomes --auth user:pass. HTTPie builds and sends the Authorization: Basic header at runtime — no base64 step for you to manage — and prompts for the password interactively if you omit it after --auth, which is the convenient pattern for terminals (use --auth-type and session persistence for repeated calls). Bearer tokens convert as an Authorization header token, matching idiomatic HTTPie usage.
Why does my GET command have no method in it?
Because GET is HTTPie's default: http example.com/api is a GET request, and adding the word GET would be noise. The converter omits the method for GET and includes it (POST, PUT, PATCH, DELETE, and anything custom) for every other verb — the same convention HTTPie's own documentation uses. If you prefer the explicit form, adding the method word to the generated command is always safe.
What happens to flags like -k, -s, and --compressed?
They dissolve into HTTPie's defaults or dedicated flags. -s (silent) maps to nothing because HTTPie formats rather than dumps output; --compressed is handled transparently for gzip responses; -k (insecure TLS) has --verify=no in HTTPie when you truly need it — the converter leaves TLS verification on, the safe default, and the flag is a one-token addition if your environment requires it.
Is my cURL command uploaded anywhere during conversion?
No. The page is static and the transpiler runs entirely in your browser — commands containing tokens, cookies, or credentials never leave your machine.