A free curl to fetch() and Axios converter
Browsers and API tools make it easy to copy a request as curl, but turning that back into working JavaScript by hand means re-typing every header and guessing at the body format. This converter reads the whole command, including flags most other tools skip, and writes a ready-to-run fetch() or Axios call. It's one of our free developer tools that run in your browser, with no sign-up and no limits.
Multi-line commands with the trailing backslash that Chrome's “Copy as cURL” adds are handled automatically, so you can paste the command exactly as copied, without first joining it into one line.
Headers, JSON bodies and form data, not just the URL
A lot of curl converters only handle the simple case: a URL and maybe one header. This one reads every -H header, JSON sent with -d or --data-raw, URL-encoded form fields, and multipart uploads from -F, including file fields, which come through as a clearly marked placeholder for the real File object. Basic auth from -u becomes a proper Authorization header, and -b cookies and -A user agents are converted the same way.
Flags that don't change the actual request, like --compressed, -L or -k, are recognised and quietly ignored rather than breaking the conversion, and anything the parser doesn't recognise is listed so you know exactly what wasn't translated.
Typed TypeScript output, not just JavaScript
The TypeScript tab wraps the same fetch() call in a typed async function, with a RequestBody interface generated from the JSON body you pasted, since that shape is already known. The response shape isn't knowable from a curl command alone, so that part is left as a clear placeholder instead of a guess: paste a real response into our JSON to TypeScript converter to generate a proper type for it in seconds.
Converting a curl command with a bearer token or API key
Authorization headers carrying a JWT are common in copied curl commands. If you want to see who a token belongs to or when it expires before you build it into your app, paste it into our JWT decoder — like this converter, it never sends the token anywhere.
Keeping request code consistent across a team
Once you have a working fetch() or Axios call, it's worth deciding once how your whole codebase should make requests, error handling included, rather than re-deciding it in every file an AI coding assistant touches. Our CLAUDE.md and AGENTS.md generator builds a rules file that can include exactly that kind of convention.
