Developer

cURL to Code

Convert curl to fetch, axios or Python.

Quick examples
cURL command
Tip: in your browser DevTools, right-click a request → Copy → Copy as cURL, then paste it here.
Generated code

This free cURL to code converter turns a curl command into ready-to-run code for 30+ targets — JavaScript fetch, Node.js (axios, got, ky, request, superagent), Python requests, PHP (cURL, Guzzle, Requests), Java (HttpClient, OkHttp, jsoup), Go, Rust, C#, Ruby, Swift, Kotlin, Dart, Elixir, R, PowerShell, HTTPie, Wget, Ansible and more. It handles methods, headers, query strings, JSON and form bodies, multipart uploads, cookies, basic auth and --data-urlencode.

Paste a curl command — or start from one of the quick examples (GET, POST JSON, bearer token, basic auth, form body, file upload, cookies) — pick a language, and the equivalent snippet appears instantly with syntax highlighting on both your command and the output. Copy it to the clipboard or download it as a source file with the right extension. The fastest way to grab a real request: open your browser DevTools, find the request on the Network tab, right-click and choose Copy as cURL, then paste it here.

Note that copied curl commands may contain cookies, tokens or other secrets, so review before sharing the generated code.

Related tools