cURL Converter
The cURL Converter reads a supported cURL command, builds a normalized HTTP request model in your browser, then generates equivalent code for Laravel, PHP cURL, JavaScript Fetch, Node.js and Python Requests.
Convert cURL to Laravel HTTP Client
Laravel output uses the Http facade with helpers such as withToken, withBasicAuth and asForm when the request shape supports them.
curl -X POST -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -d '{"name":"John"}' https://api.example.com/users
use Illuminate\Support\Facades\Http;
$response = Http::withToken('TOKEN')
->post('https://api.example.com/users', [
'name' => 'John',
]);
cURL to PHP
PHP output uses native cURL with curl_setopt_array, preserving headers, method, body and cookies where supported.
cURL to JavaScript Fetch
JavaScript output targets modern browser fetch syntax. It generates code only; the converter never calls the pasted URL.
cURL to Python Requests
Python output imports requests and maps query parameters, headers, JSON bodies, form bodies, cookies and Basic Auth to named arguments.
Headers and Authentication
Repeated headers are preserved. Bearer tokens are detected from the Authorization header, and Basic Auth is detected from -u username:password.
JSON and Form Data
When a JSON content type is present and the body parses correctly, the generators emit structured JSON-friendly code. Form-encoded data such as name=John&email=john@example.com is treated as form fields. Bodies that cannot be represented safely stay as raw strings.
Does TheCodeWala send my API request?
No. Conversion happens locally in your browser. The tool does not execute the HTTP request and does not upload your cURL command, headers, body, API keys or tokens.
Supported cURL Options
The supported subset includes -X, --request, -H, --header, -d, --data, --data-raw, --data-urlencode, -G, --get, -u, --user, -b, --cookie and --url.
Limitations
Shell parsing is intentionally limited. Pipes, redirects, command substitution, process substitution and arbitrary Bash expressions are not supported. Shell variables are not expanded and are kept as literal text when detected.
FAQ
Can I convert cURL to Laravel?
Yes. The converter turns supported cURL commands into Laravel HTTP Client code using the Http facade where possible.
Does the converter execute my request?
No. Conversion happens locally in your browser and TheCodeWala does not send the HTTP request.
Are API tokens uploaded?
No. API tokens remain in your browser memory and are only shown in the local editor and generated code.
Does it support POST requests?
Yes. It supports common POST, PUT, PATCH and DELETE requests with JSON, form or raw bodies.
Does it support Bearer authentication?
Yes. Authorization Bearer headers are detected and Laravel output uses withToken when appropriate.
Can it convert JSON bodies?
Yes. JSON bodies are parsed when the cURL command includes a JSON content type.
Does it support browser DevTools cURL commands?
It supports the most common DevTools cURL options such as headers, method, data, cookies and URL. Arbitrary shell syntax is intentionally limited.