DEVELOPER TOOL

cURL Converter

Convert a cURL command to fetch, Axios, Python or PHP locally, without executing a request.

Runs locallyRuns locally in your browser. Your data is not uploaded.

Parse and generate only. No request is executed. Credentials stay in this workspace and are preserved in generated code.

cURL / request to code

CURL COMMAND

GENERATED CODE

Paste one curl command, choose a target, then convert.

Enable JavaScript to convert locally. No server submission is available.

FROM REQUEST TO CODE

Translate, then review.

Paste one POSIX-style curl command, select JavaScript fetch, Axios, Node.js fetch, Python requests or PHP cURL, and convert. The command is parsed locally; neither the URL nor generated code is executed.

Keep the request intact.

Method, distinct headers and inline body values are preserved. JSON bodies remain literal strings so large numbers, duplicate keys and original formatting are not rewritten. Repeated data options join with an ampersand as in cURL; data-urlencode percent-encodes the value.

Credentials are still credentials.

Basic auth, Authorization, Cookie and X-API-Key values remain in the generated code. A note identifies likely sensitive content without redacting it. There is no saved history, sharing URL, telemetry or remote request.

SUPPORTED REQUESTS

Know what is translated.

Which shell syntax is accepted?

Single and double quotes, escaped characters and backslash line continuations are supported. Shell expansion, command substitution, pipes, redirects, extra commands, PowerShell, Windows cmd and ANSI-C dollar quoting are rejected. Dollar text inside single quotes or escaped outside them is literal. Nothing is interpreted by a shell.

Which cURL options work?

URL, request method, headers, data/data-raw/data-binary/data-urlencode, user:password auth, literal cookies, user agent, referer, text form/form-string, get, head, location and globoff. Short forms, attached short values and long option=value forms work. Unknown options stop conversion. Recognized transport, proxy, TLS, retry and output options produce an explicit omission warning.

What cannot be represented?

Files, stdin, file uploads, multiple URLs, duplicate or suppressed headers and multipart attributes are rejected. Text forms use each library’s own multipart boundary. PHP rejects repeated form names. Fetch targets reject GET/HEAD bodies. Browser snippets remain subject to CORS and forbidden-header restrictions; Axios redirect controls apply to Node.js.

What are the limits?

16 KiB UTF-8 command, 512 arguments, 64 headers, 100 text form fields and 128 Ki characters of generated code. Use an explicit HTTP(S) URL without embedded credentials. Generated code is text, with safe string escaping for its target language.

What do I need to run the result?

The converter itself needs no package or network service. Generated Axios and Python snippets require axios or requests in your project; PHP needs the cURL extension. Node.js fetch uses a modern runtime’s built-in fetch and FormData. No packages are installed by this tool.

Find a tool or category

Tools & categories12 results