cURL to Fetch / Axios

Turn a curl command into fetch or axios. The request is not sent.

Added 2026-10-23

What it does

cURL to Fetch / Axios rewrites a curl command, including Copy as cURL, into a fetch or axios snippet in this tab. Headers, JSON bodies, and form fields are copied into the snippet. Flags this page does not understand are listed instead of being dropped. The command is not executed. Arguments written as @file are left empty, because the page cannot open a file named in the text. -u becomes an Authorization header, which still contains the user and password. Anyone who can see that header can recover both. Tokens in the snippet remain secrets. Do not paste the result into a place other people can see. Nothing is requested from the URL in the command.

How to use it

  1. Paste a curl command, including the output of Copy as cURL.
  2. Choose fetch or axios. Unsupported flags are listed instead of being dropped.
  3. Copy the snippet. The command is not executed.

Common mistakes

  • The request is not sent. This only rewrites the command. Tokens in the snippet are still secrets, so don’t paste it into a shared place.
  • Basic auth is not encryption. -u becomes an Authorization header. Anyone who can see the header can recover the user and password.
  • Files are not read. @file arguments are left empty. The page cannot open files from the command text.

Conversion stays in this tab. The command is not uploaded and the request is not sent.

Related tools