How to use Fetch/Axios to cURL
- Paste a fetch() or axios() call from your code.
- Click Convert to get the equivalent cURL command.
- Copy the cURL to run in terminal or share with others.
Example
Input
Your input or data here
Output
Result will appear here after running the tool
Frequently asked questions
- What fetch/axios patterns are supported?
- Simple one-line or multi-line fetch(url, { method, headers, body }) and axios({ url, method, headers, data }). Common quoting styles are supported.
- Can I convert cURL to fetch?
- Yes. Use the cURL to Fetch/Axios tool for the opposite direction.
Related tools
- IP LookupDisplay IP information, country, and ISP
- DNS LookupQuery DNS records for a domain
- User Agent ParserParse browser and device information from user agent
- HTTP Header ViewerShow request headers sent by your browser
- HTTP Status Code LookupLook up HTTP status code meaning
- cURL to Fetch/AxiosConvert cURL command to JavaScript fetch or axios code