Skip to content
Run here 100% in your browser, no upload, no login

cURL to Code

Turn a cURL command into fetch, Python requests or Go net/http code.

Notes

How to use it

  1. Copy a cURL command from documentation, DevTools (Copy as cURL) or a README, and paste it into the left panel.
  2. Pick the Target: JavaScript fetch, Python requests, or Go net/http.
  3. The generated snippet appears on the right; unclear spots are listed under Notes instead of being silently dropped.
  4. Use Copy to take the code into your editor.
  5. Press Sample to load an example command that exercises method, headers, body and basic auth.

Common use cases

Why it stays private

The command is parsed with a small tokenizer in your browser's memory. cURL commands often carry session tokens, API keys and internal URLs, so nothing is transmitted anywhere.

FAQ

Q: Which flags are understood? A: -X/--request, -H/--header, -d/--data (plus --data-raw, --data-binary, --data-ascii), --data-urlencode, -u/--user and --url. Common switches like -L, -k or --compressed are recognized but have no direct code equivalent.

Q: What happens with flags it does not know? A: They are ignored, and every ignored or approximated detail is listed in the Notes section so you can decide what to adjust by hand.

Q: Can it read body files like -d @data.json? A: No. Browser pages cannot read local files you did not pick explicitly - the file reference is reported in the Notes, and you should paste the file content yourself.

Your data stays on this device

cURL to Code runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.