Turn any curl command into fetch or axios code you can paste straight into your project. Unrecognized flags stay visible as comments.
Your command is parsed locally in your browser. URLs, headers and credentials never leave your device.
The converter tokenizes your command the way a shell would — respecting single quotes, double quotes and backslash escapes, and joining line-continuation backslashes — then walks the tokens after curl and translates the flags it knows into the equivalent fetch or axios options. Everything it cannot represent in browser code is kept visible as a // dropped: comment instead of being silently swallowed.
-X / --request → method (defaults to POST when a body is present, otherwise GET) · -H / --header (repeatable, Name: value) → headers · -d, --data, --data-raw, --data-binary, --data-ascii → body, multiple parts joined with & · --json → body plus a content-type: application/json header · --url and the first positional token → the request URL.-d body parses as JSON and no content-type header was sent, the output carries a note that most APIs will need application/json. -u user:pass becomes a Basic header built with btoa(), with a warning comment: hardcoded credentials are a leak risk in shipped frontend code.--compressed is a no-op in browsers (they always negotiate gzip themselves) and -b / --cookie, -F multipart uploads, -O / -o output flags and any unknown flag appear only as dropped-flag comments. The comments are honest: if the real request needs cookies or file uploads, the generated snippet is a starting point, not a complete port.No. It only reads your curl command as text and writes equivalent JavaScript — nothing is fetched and no network request is made by the converter itself. Paste the generated code into your own project and run it there when you are ready.
They are dropped with a comment rather than pasted into headers. Browsers manage cookies through Set-Cookie responses and the credentials: 'include' fetch option, and a hardcoded Cookie header is silently ignored by fetch. If you need session cookies sent, add credentials: 'include' to the options and let the browser carry the cookie jar.
Not faithfully. curl -F builds a multipart/form-data body with a generated boundary, and that boundary cannot be set by hand in a browser — the fetch implementation must create it. The converter recognizes -F, drops it with an honest comment, and tells you to rebuild the body as FormData in JavaScript.
No. Anything the parser does not recognize (like --limit-rate or --retry) is emitted as a // dropped: comment listing the flag verbatim, so you can see exactly what was not translated instead of assuming the code is complete.
No. The command is tokenized and reprinted by a plain JavaScript parser running in your browser. Your URLs, headers and credentials never leave the tab — and none of this needs a network connection.
If you just finished with curl to JavaScript, the natural next steps are UUID Generator, UUID v7 Generator, ASCII Banner, or browse every tool in Privacy File Tools.