Curl to PHP Converter

PHP curl extension or Guzzle — from any curl command

Paste a curl command and get PHP using the native curl extension (curl_init / curl_setopt) or Guzzle. Ideal for WordPress, Laravel, and shared hosting without Composer.

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

curl to PHP FAQ

curl extension or Guzzle?

Use the curl extension on shared hosting or legacy code. Use Guzzle in modern apps (Laravel ships with an HTTP client built on Guzzle). Toggle above.

How are multipart file uploads handled?

-F 'file=@photo.jpg' becomes CURLFile or Guzzle multipart with a comment to point at your real path — the browser cannot read local files.

Stripe / PayPal API curls?

Yes. JSON POST with -u sk_live:... or Bearer headers converts to the right PHP auth and body options.