Convert cURL commands to code in 12+ programming languages instantly.
Free online cURL to code converter. Paste any curl command and instantly generate idiomatic code in JavaScript (fetch, Axios, Node.js), Python (requests, http.client), Go, PHP, Ruby, Java, C#, Rust, Swift, Kotlin, and PowerShell. Supports all common cURL flags: headers, body data, basic auth, cookies, multipart forms, proxies, and SSL options. Includes a request inspector showing parsed URL, method, headers, and body type. Runs entirely in your browser — no cURL command is ever sent to a server.
Keywords: curl to code, curl to javascript, curl to python, curl to fetch, curl to axios, curl to go, curl to php, curl to ruby, curl to java, curl to csharp, curl to rust, curl to swift, curl to kotlin, curl converter online, curl command to code, convert curl to fetch, curl to python requests, curl to node.js, http request generator, api request converter, curl import, postman curl import
Tags: curl, converter, http, fetch, requests, api, code-generator
Paste your cURL command into the input area on the left. Multi-line curl commands with backslash continuations are supported.
Choose your target language from the language selector in the bottom bar — JavaScript fetch, Axios, Python requests, Go, PHP, Ruby, Java, C#, Rust, Swift, or Kotlin.
Click Convert or press ⌘↵ to generate idiomatic code instantly.
Toggle the Request Inspector (⌘⇧I) to verify the parsed URL, method, headers, body, and authentication.
Copy the generated code with ⌘⇧C, download it as a file, or share your cURL command via a compressed URL.
14 language targets: JavaScript fetch, Axios, Node.js http, Python requests, Python http.client, Go net/http, PHP cURL, Ruby Net::HTTP, Java HttpClient, C# HttpClient, Rust reqwest, Swift URLSession, Kotlin OkHttp, and PowerShell.
Complete cURL flag support: -X, -H, -d, --data-raw, --data-binary, --data-urlencode, -F (multipart), -u (basic auth), -b (cookies), -L (follow redirects), -k (insecure), --compressed, -o, --connect-timeout, -m, --proxy.
Smart body type detection: automatically identifies JSON body, form-urlencoded, and multipart data from the cURL flags and content.
Request inspector: visual breakdown of the parsed request showing URL, method, header count, body type, auth type, and cookies.
Multipart form support: handles -F file uploads and form fields with correct multipart/form-data encoding per language.
Basic authentication: parses -u user:password and generates language-specific auth code (Authorization header, auth parameter, etc.).
Line continuation support: correctly parses multi-line cURL commands using backslash line continuations.
Auto-convert mode: regenerates code as you type for instant feedback.
Shareable URLs: gzip-compresses your cURL command into a URL parameter for sharing with teammates.
Works entirely in your browser — no cURL commands are ever sent to any server. Your API keys and tokens stay private.
Keyboard shortcuts: ⌘↵ to convert, ⌘⇧C to copy, ⌘⇧K to clear, ⌘⇧I to inspect.
The cURL to Code Converter supports 12 SQL dialects. Select the right dialect for accurate formatting and keyword recognition.