● runs entirely in your browser

curl to Code Converter

Paste a curl command to get the equivalent request in JavaScript, Python, or PHP. Nothing is ever uploaded — including whatever headers or tokens are in your command.

How it works

A small hand-written tokenizer splits your curl command into arguments — respecting quoted strings and line-continuation backslashes — then a parser walks those tokens to pull out the method, URL, headers, and body, which get rendered into equivalent JavaScript fetch, Python requests, or PHP curl code.

FAQ

Which curl flags does it actually understand?
-X/--request, -H/--header, -d/--data (plus its --data-raw/--data-binary/--data-urlencode variants), -u/--user, --url, and -G — any other flag is silently skipped rather than causing an error.
Does it detect the HTTP method automatically if I don't pass -X?
Yes — if no method is specified, it infers POST when there's a -d/data payload and GET otherwise, matching curl's own default behavior.

Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.

Say thanks — $3