cURL to code converter
Paste a cURL command and get equivalent code for JavaScript fetch, Python requests or Node.js axios.
How to use
Paste a cURL command — the kind you copy from your terminal, an API doc or your browser's network tab — and get ready-to-use code in your language of choice. Switch between JavaScript fetch, Python requests and Node.js axios, and the code regenerates instantly.
It reads the method, URL, headers, request body and basic auth from the command and writes idiomatic code you can paste straight into your project. Copy the output with one click.
Parsing happens entirely in your browser, so commands containing tokens or credentials are never sent anywhere.
Examples
Turn a documented curl example into a JavaScript fetch call for your frontend.
Convert a curl POST into a Python requests snippet for a script.
Paste a 'Copy as cURL' from devtools and get axios code for Node.
Frequently asked questions
Which languages can it generate?
JavaScript (fetch), Python (requests) and Node.js (axios), covering the most common HTTP clients.
Does it handle headers and request bodies?
Yes. It parses -H headers, -d/--data bodies, the -X method and -u basic auth into the generated code.
Is my command sent to a server?
No. Parsing and code generation happen in your browser, so any tokens in the command stay private.
What if my curl command is complex?
Common options are supported. Very advanced flags (file uploads, cookies jars) may not be fully represented, so review the output.
Related tools
Format, validate and minify JSON with precise error locations and key sorting.
Decode a JSON Web Token's header and payload and inspect its time claims. No verification.
Break a URL into its protocol, host, path, query parameters and fragment.
Encode text to Base64 or decode Base64 back to text, with URL-safe support.
A searchable reference of HTTP status codes — what 200, 301, 404, 418, 500 and the rest actually mean.