How it works
This tool parses the cURL command (flags like -X, -H, -d, --data, --data-raw, --header, -b, -u and the URL) and generates idiomatic code in your chosen language. It handles:
- HTTP method — from
-Xor inferred from data presence. - Headers — all
-H/--headerflags. - Body — from
-d,--data,--data-raw. - Basic auth — from
-u user:pass. - Cookies — from
-b/--cookie.
Everything runs in your browser — the command never leaves your computer.
Formats, sizes and other limits
The command is tokenised by a small shell-aware splitter that respects single and double quotes, so a header value containing spaces stays one token instead of four. Flags are then mapped onto a request object: -X for the method, -H for headers, -d and --data-binary for the body, -F for multipart uploads, -u for basic auth, -k to ignore TLS errors and -b for cookies. getLang() reads the language radio and dispatches to genPython() (requests), genJS() (fetch), genPHP() (curl) or genGo() (net/http), and indentCode() normalises the whitespace of whatever comes back.
Where it stops working
Only the common flags are understood. --resolve, --cert, --retry, --limit-rate and mixed -F/-d payloads degrade or vanish, and @file references are not inlined, so the generated code expects a literal body. The output also has no timeout, retry or connection pooling — those are production concerns the one-liner never expressed, and adding them is your job.
Privacy: nothing is uploaded
The command stays a string in this tab: it is tokenised, mapped to a request object and printed. Nothing is executed, and the URL inside it is never contacted.
Frequently asked questions
Why does the generated code differ from what I expected?
Because only a subset of curl's options is mapped. If a flag is missing from the output, it is one the converter does not model yet — check the request object it did produce.
Is it safe to run the output?
The code does what the command did, including sending any credentials you pasted. Review the auth and header lines before running it, and never commit the generated snippet with a live token in it.
What happens to cookies?
A -b or explicit Cookie header becomes the equivalent field in each language. Session state is not persisted, so a second request starts clean.