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.
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.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Parse Bash quoting/request data and check method/header/body/auth preservation across three languages; also parse generated Python.
- Comparison reference
- Python standard-library ast.parse and explicit request-field assertions.
- Verification scope
- Syntax/request-field checks do not send every generated request to real services.
Test source and cases (select a file to read it)
-
network-tools.test.js
- cURL conversion uses actual Bash quoting/data semantics and emits all three target languages
- cURL warnings survive conversion and input command substitutions are never executed
- cURL literal JSON preserves big integers, decimal spelling, duplicate keys and UTF-8 bytes
- cURL Basic auth preserves UTF-8 credentials, explicit overrides and per-URL values
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.