Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

cURL to Axios

Convert cURL commands to Axios request code. Handles methods, headers, authentication, JSON bodies, and form data.

Processed locally in your browser — nothing is uploaded.

0 characters

Axios request

Output appears here…

About cURL to Axios

Convert any cURL command into an Axios call. The generated code uses the axios(config) form with method, url, headers, params, and data so it stays readable for complex requests.

Common uses

  • Convert API docs written for the terminal into Node.js or browser code
  • Move quick cURL experiments into an existing Axios codebase

Example

Input

curl https://api.example.com/search?q=test -H 'Authorization: Bearer TOKEN'

Output

const response = await axios({
  method: "GET",
  url: "https://api.example.com/search",
  params: { q: "test" },
  headers: {
    Authorization: "Bearer TOKEN",
  },
});

Limitations

  • cURL options without an Axios equivalent are reported but skipped