Turn any cURL command into fetch, axios, or Python requests code. Parsed locally — safe for real tokens.
Paste a cURL command to translate it into fetch, axios, or Python code
cURL parsing and code generation run entirely in your browser. Your command (including any tokens!) is never uploaded.
A shell tokenizer first splits the command, honoring single quotes (no escapes inside), double quotes (\\" \\$ escapes), and backslash continuations. Then a flag pass maps each option: -H becomes a header pair, repeated -d flags join with & exactly as cURL sends them, -F flags signal multipart FormData, -u becomes HTTP Basic auth, and the method defaults to POST when a body exists, GET otherwise. Output is copy-paste runnable — but review it: secrets in the command end up in the code.
Quote handling follows real shell semantics: single quotes are literal, double quotes allow escapes, backslash continues lines.
Kai copies a working cURL from a Stripe-style dashboard and needs it inside his Next.js route handler.
Convert cURL to JavaScript Fetch, Axios, or Python requests online free. Shlex-safe parsing, live preview.
API documentation speaks cURL; your application speaks Fetch, Axios, or Python requests. Retyping a complex command - headers, auth, multipart bodies - is where transcription bugs live. Pasting the command and getting correct, idiomatic code in your actual HTTP client removes the entire class of copy mistakes.
The tokenizer mirrors Unix shell rules: single-quoted strings are literal, double-quoted strings honor backslash escapes, and trailing backslashes join continued lines. The parsed request - method, URL, headers, body, auth - previews live before generation, and the whole pipeline runs in your browser so credentialed commands never leave the page.
The parser reads -X (method), -H (repeated headers), -d (multiple bodies are joined with an ampersand), -F (multipart with @file detection), -u (basic auth), --url, -L (follow redirects), -k (insecure), -I (HEAD), -A (user agent), -e (referer), and -b (cookies). Unsupported flags are reported instead of silently dropped.
Commands are tokenized with a shlex-style parser: single quotes protect everything inside, double quotes allow backslash escapes, and backslash line continuations join multi-line commands. This mirrors how a Unix shell would parse the same command.
No. Parsing and code generation run entirely in your browser - a cURL command containing an Authorization header never leaves the page. This is exactly why the tool exists: pasting credentialed cURL into random websites is a real leak vector.
Why did the elephant paint its toenails red?
No paywalls, no signups, no data sold. Built by a solo developer who believes useful tools should be accessible to everyone.
☕Support me on Ko-fi— keep tools free100% of proceeds go towards hosting & building more free tools.