curl → fetch / axios / Python / Go
Private by design — runs entirely in your browser
Paste a curl command — including -H, -d, -u and method flags — and Toova emits the equivalent in JavaScript fetch, axios, Python requests or Go net/http. Useful when porting a quick API check between languages.
What the converter parses
Toova tokenises the command exactly the way a POSIX shell would, so single and double quotes, line-continuation backslashes, and stacked headers all survive the round-trip. It picks up -X for the verb, repeated -H for headers, -d / --data-raw / --data-urlencode for the body, and -u for basic auth, which becomes a Base64-encoded Authorization header in the output. Non-functional flags like -L, -k, -s and --compressed are silently ignored.
How each target shapes the output
JavaScript fetch keeps the URL inline and emits an options object with method, headers and body. axios uses its config object so headers, query and body live in one place — and if your --data parses as JSON, the converter promotes it to the typed data field. Python requests inlines the URL, picks json= for JSON payloads and data= for everything else. Go net/http builds an http.NewRequest, sets each header, and reads the body off io.ReadAll for parity with idiomatic Go.
Why nothing leaves your browser
Production curl commands typically embed bearer tokens, API keys, or session cookies — exactly the kind of strings you should not paste into a public web form. The converter runs as a tiny piece of JavaScript on this tab. Open DevTools while you experiment; you will not see a request fire when you paste or switch language. That is the contract.
Frequently Asked Questions
- Which curl flags are supported?
- -X / --request, -H / --header, -d / --data / --data-raw, --data-urlencode, -u / --user and all the non-functional flags (-L, -k, --compressed, -s/-v, --silent).
- Does it handle JSON bodies?
- Yes. When --data is valid JSON, the axios and Python outputs use the object form so the payload is typed, not stringified. Other formats stay as the raw string.
- What about multipart uploads?
- Single -F is parsed as a header-free body and converted as-is. Full multipart support is on the roadmap — for now switch to FormData manually in fetch / axios.
- Are tokens or API keys logged?
- No. The conversion happens in this browser tab. Toova does not see your curl command and there is no telemetry on the input field.
- Why does my GET turn into a POST?
- That is curl behaviour: when --data is present the method is auto-promoted to POST unless you explicitly override with -X GET. The converter mirrors that so the generated code keeps the same semantics.
- Can I save my output?
- Just copy the code with the Copy button. We deliberately do not persist anything between page loads — keep the page open while you iterate.