cURL Converter
Paste a cURL command and instantly convert it into HTTP request code for popular programming languages. Method, headers, body and auth are parsed automatically — ready to copy and use.
Enter a cURL command above and the converted code will appear here.
How to Use
Paste a cURL command
Paste a cURL command copied from your browser DevTools or an API documentation into the input field.
Choose a language
Pick a target language from the tabs: JavaScript (fetch), Python, Node.js, PHP, Go or Ruby.
Copy the code
Copy the generated code to your clipboard and paste it straight into your project.
About the cURL Converter
This tool converts cURL (Client URL) commands into HTTP request code for popular programming languages. Take a command from API docs or your browser's "Copy as cURL" and instantly turn it into fetch, requests, axios and more. All parsing happens locally in your browser — your command is never sent to a server.
Features
- 6 LanguagesGenerates code for JavaScript (fetch), Python (requests), Node.js (axios), PHP (cURL), Go and Ruby.
- Automatic ParsingParses method, headers, body, Basic auth, multipart forms and cookies automatically.
- Safe Custom ParserNo eval is used — a custom parser handles quoting and line continuations correctly.
- Fully In-BrowserAll conversion runs in your browser. Your command is never transmitted anywhere.
Use Cases
- Port cURL examples from API docs to your language
- Convert "Copy as cURL" from browser DevTools into code
- Turn Postman/Insomnia cURL exports into code
- Rewrite shell scripts as application code
- Build sample snippets for API integration & learning
FAQ
Which cURL options are supported?
Is my cURL command sent to a server?
Which languages can I convert to?
Can it handle multi-line cURL commands with backslashes?
Is the JSON body formatted?
How are API tokens and credentials handled?
Feedback
Missing a feature, or getting a result that looks wrong? Let us know — we improve our tools based on your feedback.