curl2ts 🔒 100% client-side

cURL to Axios (TypeScript)

Generate a typed axios.request<TResponse>() call from any cURL command.

cURL command

Typed Axios requests

Query params are passed through Axios' params option, the JSON body is sent as data, and the response is typed with Axios' generic.

Why curl2ts?

Supported cURL flags

-X / --request, -H / --header, -d / --data / --data-raw / --data-binary, --json, -u / --user, -b / --cookie, --url, plus single, double and $'…' quoting and \ line continuations (Chrome / Firefox "Copy as cURL" works).