← back to flaviocopes.com

cURL to Code

← All tools

Paste a curl command and copy fetch(), Node.js, or Python requests equivalents.

Your command never leaves the browser — no upload, no server.

~~~

Input

Supports line continuations (\ and^), quoted args, headers, JSON/form bodies, basic auth, and cookies.

~~~

Notes

~~~

About this tool

The inverse of the Route → curl tool: you already have a curl one-liner from docs or DevTools and need runnable code. JSON bodies are detected and pretty-printed into the output when possible.

~~~

Read more