cURL Converter
Turn curl Commands into Code
Paste a curl command from API docs or your browser's Network tab and get working code. JavaScript fetch, Node.js, Axios, Python requests, Go, PHP, Java, C#, Rust, Ruby, Swift, PowerShell and more than 25 others. Headers, JSON bodies, forms, files, cookies and auth all carry over. The command is read in your browser and no request is ever sent.
cURL Converter
Examples
In Chrome, Edge or Firefox: open the Network tab, right-click a request and choose Copy as cURL (bash). The command is never saved or sent anywhere.
Notes from the converter
Common Use Cases
API Docs to Code
Most API references show curl. Paste the example and get it in the language your project uses.
Replay a Browser Request
Copy a request as cURL from the Network tab and turn it into a script that repeats it with the same headers.
Write Tests Faster
Turn a working curl call into Python or JavaScript for an integration test or a monitoring check.
PowerShell on Windows
Get an Invoke-RestMethod version of a curl command for a Windows script or a scheduled task.
HAR and Raw HTTP
See the exact HTTP request a command sends, or export it as HAR for other tools.
Learn a New HTTP Library
Compare the same request in fetch, Axios, Got and Ky to see how each library is written.
Frequently Asked Questions
Why We Built the cURL Converter
Every API documents itself in curl, and almost nobody ships curl. Rewriting a command by hand means getting quotes, JSON escaping and multipart uploads right in another language - exactly where bugs hide. This converter does it with a real shell parser and gives you code in the language you need.
Commands copied from a browser carry live session cookies and tokens, so it matters that this runs on your device: nothing is sent, stored or put in a link.
It is part of the free developer toolkit on RJL.io. Turn a docker run command into Compose with Docker Run to Compose, format a JSON body with JSON Tools, and decode a token with the JWT Decoder.
Conversion by curlconverter 4.12.0 (MIT) with web-tree-sitter (MIT).