cURL to Code Converter
Paste a curl command and get the equivalent request code. Method, headers, JSON or form body, and basic auth all carry over. Nothing is sent anywhere - the conversion runs in your browser.
Paste a curl command and get the equivalent request code. Method, headers, JSON or form body, and basic auth all carry over. Nothing is sent anywhere - the conversion runs in your browser.
It reads a curl command the way your shell would - quotes, escapes, and backslash line continuations included - then rebuilds the same HTTP request in the language you pick. It works out the method from -X or from whether there's a body, splits each -H header into a key and value, collects -d data, and reads -u credentials as basic auth. The result is ready-to-run code, not a rough sketch.
Copying a request as curl from your browser's network tab is easy. Turning that into working fetch or requests code by hand is the annoying part, especially once headers and a JSON body are involved. Paste the curl, pick fetch, axios, or Python, and copy code you can drop straight into your app or a quick script.
Headers, the request method, basic auth from -u, and the request body all transfer. A JSON body (set by a Content-Type of application/json, or one that just looks like JSON) is parsed and printed as a real object so you can edit it, while form-style bodies stay as a string. The -G flag folds your data into the query string. Flags that only affect curl's own output, like -s, -L, or -o, are ignored.