cURL to Code Converter
Convert Bash cURL commands to JavaScript fetch, Python requests or Go net/http code. Review parser warnings without running the input command.
Convert a copied request
Paste a command copied as cURL for Bash, choose a language and run. The converter uses curlconverter 4.12.0 with a Bash parser, rather than splitting on spaces. Quoting, line continuations, repeated data flags, JSON bodies, query parameters, headers and common authentication options are parsed by that engine. The result can be copied or downloaded as a source file. Literal Basic credentials use UTF-8, and explicit Authorization headers or suppression are retained.
JavaScript output uses fetch; Python needs the requests package, and Go uses its standard net/http library. Generated requests are not sent here. Browser fetch remains subject to CORS, forbidden headers and browser credential rules. Python and Go can behave differently from a browser.
Warnings are part of the result
Some curl options have no equivalent in the selected client or are not implemented by the engine. Review the diagnostics below the controls; an output containing warnings is not a promise of request equivalence. Literal JSON bodies are emitted as raw text, preserving large integers, decimal spelling, duplicate keys and whitespace while keeping the original headers. Redirect handling, file uploads, form encoding and multipart boundaries still need review; signed requests require byte-level comparison.
The input is parsed, never executed. Environment variables, command substitutions, file references and shell syntax can still appear in generated code; review that code before running it elsewhere. This accepts Bash syntax, not Windows cmd or PowerShell syntax. Limits are 50,000 input characters, 1,000,000 output characters and a cancellable 10-second worker. The local WASM parser needs a modern browser supporting module workers and top-level await.
Reference
Questions & answers
Are large JSON IDs and duplicate keys preserved?
Literal JSON bodies are generated as raw text rather than parsed into JavaScript numbers or a Python dictionary. This preserves IDs beyond the safe integer range, decimal spelling and repeated keys. Dynamic shell values or external files still require review of the diagnostics and actual request.
Does conversion execute shell commands?
No. Only syntax is parsed. The generated code is displayed as text, with no evaluation, shell process or automatic request.
Is my input uploaded?
No. Parsing and generation run in your browser. Engines and datasets load from this site; the tool does not store input or send it to a processing API.