Toolvist

cURL to Fetch Converter

Convert a cURL command into JavaScript fetch, Axios, Python requests or Go code in one paste. Free cURL to code converter for four languages.

Paste a curl command, including multi-line ones.

Target language

Method

—

Headers

0

Body

—

Auth

—

cURL to Fetch Converter

Paste a cURL command and get equivalent code in JavaScript fetch, Axios, Python requests, Go or PHP. Headers, methods, JSON bodies, form data, basic auth and cookies are all translated.

How to Use

Copy a request from your browser DevTools "Copy as cURL" or from API documentation, paste it above, and choose your target language. The parser understands quoting, escaped characters and line continuations, so multi-line commands work as-is.

  • fetch, Axios, Python, Go and PHP output
  • Handles -X, -H, -d, --data-raw, -u, -F and -b
  • JSON bodies converted to native objects
  • Form data and multipart requests
  • Copy any language in one click

Related Developer Tools

Browse all Developer Tools →

You might also need

Tools from other categories that people pair with the cURL to Fetch:

Browse the full tool directory →