cURL to code
Paste a curl command and get the same request as fetch, axios, Python requests, Go or PHP.
curl
Code
What it does
cURL to code turns a curl command, for example one copied from your browser’s developer tools, into the same request in JavaScript fetch, axios, Python requests, Go or PHP. Headers, cookies, authentication and the body come along, and secrets can be hidden. It runs in your browser.
How to use it
- 1Paste a curl command.
- 2Pick the language.
- 3Copy the code.
Questions
Is the request sent?
No. The command is only turned into code on your device. Nothing is called.
What does Hide secrets do?
It replaces tokens, cookies and passwords with <hidden>, so you can share the code.
Where do I get a curl command?
Open the developer tools in Chrome, Firefox or Edge, right-click a request in the Network tab and choose Copy as cURL.
AD320 × 100