curl2ts 🔒 100% client-side

cURL to Ky (TypeScript)

Generate a typed Ky request from any cURL command.

cURL command

Typed Ky requests

JSON bodies are sent with Ky's json option, query params via searchParams, and responses come back through .json<TResponse>().

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).