curl to Code Converter

About this tool

Paste any curl command — for example one copied from your browser's "Copy as cURL" — and this tool parses out the request URL, HTTP method, every header and the request body, then emits equivalent code in your chosen language. It understands common curl flags: -X / --request for the method, -H / --header for headers, -d / --data / --data-raw / --data-binary and -u / --user for basic auth, plus quoted and line-continued (\\) arguments.

Choose JavaScript fetch, Node axios, Python requests, PHP cURL, Java HttpClient or Go net/http from the dropdown; the method is set automatically (implied POST when a body is present), JSON bodies are detected from the content type, and basic-auth credentials are wired up per language. Everything runs locally in your browser — no build step, no server, no upload — so it is safe for commands that contain tokens or credentials.

Related tools

HTTP Request BuilderHTTP HeadersURL Parser