Curl Converter

Convert curl to Python, PHP, Go, Axios, Java, C#, or PowerShell

Paste any curl command copied from API docs, Postman, or your terminal. Pick a target language and get ready-to-run code with headers, JSON bodies, form data, multipart uploads, and basic auth handled correctly. 100% in your browser.

Supports multi-line commands with \ line continuations. Conversion runs as you type.

Convert to:

Example curl commands

Supported output targets

LanguageLibraryLanding page
Python requests or httpx curl to Python
PHP curl extension or Guzzle curl to PHP
Go net/http curl to Go
JavaScript axios curl to Axios
Java OkHttp curl to Java
C# HttpClient curl to C#
PowerShell Invoke-RestMethod curl to PowerShell

How it works

Why convert curl to code?

API documentation and tools like Postman often show requests as curl commands. When you build an app in Python, PHP, or Go, you need the equivalent HTTP client code. This tool parses your curl flags and generates idiomatic code for the library you choose.

What curl flags are supported?

Common flags: -X, -H, -d, --data-raw, --data-urlencode, --json, -F, -u, -b, -L, -k, --compressed, and multi-line \ continuations. File uploads (@file) are translated with placeholders and a warning because the browser cannot read your local files.

Curl Converter FAQ

Is my curl command sent to a server?

No. Parsing and code generation run entirely in JavaScript in your browser. Nothing is uploaded or logged.

Which language should I pick?

Use the dedicated pages for SEO-focused workflows: curl to Python, curl to PHP, or switch targets anytime with the picker above.

Can I share a converted command?

Yes. The URL updates with a ?cmd= parameter (base64url-encoded curl) so you can bookmark or share the same input.