Paste a cURL command, get the same request in 10 languages
You found an API example on the docs page or copied a request out of your browser's Network panel and it came out as a long, scary-looking `curl` command. You don't write shell, you write JavaScript, Python, Go, PHP, Ruby, Rust. You need the same call in your language and you need it now.
This converter does exactly that. Paste a cURL command on top (one line or multi-line with `\` continuations from Unix or `^` from Windows), and a clean, runnable snippet appears below in the language tab you pick. It handles the flags real-world cURL commands actually use: `-X`, `-H`, `-d` / `--data-raw` / `--data-urlencode`, `-F` multipart, `-u` basic auth, `-A` user-agent, `-b` cookies, `-G` GET-with-body-as-query, `-L` follow redirects, `-k` insecure, `--compressed`, and `--max-time`.
Output covers JavaScript fetch, axios, Node fetch, Python requests, Python httpx, Go net/http, PHP Guzzle, Ruby Net::HTTP, Rust reqwest and a cleaned-up cURL for the cases where the original was a mess. Pick a tab, copy, paste into your code. All parsing runs in your browser, no upload, no analytics on the URL you typed.
How to use it
- Paste your cURL command in the input box. The default sample shows the most common case: a `POST` with JSON body and an Authorization header. Replace it with whatever you have.
- Multi-line commands with `\` at end of line (Unix shell) or `^` at end of line (Windows `cmd.exe`) are joined automatically. You can paste the exact text from a tutorial without cleaning it up first.
- Pick a language tab at the top: fetch, axios, Node fetch, Python requests, Python httpx, Go, PHP, Ruby, Rust, or cURL re-formatted. The output pane updates immediately, no Convert button to click.
- Click Copy in the top-right of the output pane. The snippet goes to your clipboard, ready to paste into your editor. The button shows a check mark for one second so you know it worked.
- If the parser found flags it does not understand, a yellow warnings panel appears below the output. Read it: usually it is a flag that only affects shell output (`-s`, `-v`, `-o file`) and you can ignore it. If it is something request-level, you may need to add it by hand.
- Edit the cURL on the fly: change a header, swap `POST` to `PUT`, drop a field from the JSON body, the output regenerates on every keystroke. Faster than re-running the converter.
- Re-use the cURL tab as a normalizer. Paste a messy multi-line command, copy the cURL tab output back, and you now have a one-screen version with consistent quoting.
When this is useful
Seven moments where retyping a cURL command into your real codebase would take longer than the rest of the feature:
- Copy from the browser, paste into code. Right-click a request in Chrome / Firefox DevTools → Copy as cURL, paste it here, pick your language, copy. The request you saw in the network tab is now a working snippet in JavaScript, Python or Go, with the exact same headers and body.
- Translating an API docs example. The API documentation only shows `curl`. You need it in Python requests for a Django backend or Ruby Net::HTTP for a Rails controller. Paste once, switch tabs, copy. Saves the 20 minutes of "how do I do auth in requests again?" lookup.
- Reproducing a Postman / Insomnia request. Both tools have a "Copy as cURL" menu. Use that to round-trip into real code you can commit, instead of leaving the call locked inside a GUI tool that only you have installed.
- Sharing a working call with a teammate. They asked: "how do I hit our staging API from a Node script?". You have the cURL command that works for you. Convert to Node fetch or axios and paste it in Slack, they can run it as-is.
- Migrating from one HTTP library to another. Your codebase mixes `requests` and `httpx`, or `fetch` and `axios`. Drop the existing call here as cURL, copy the new-library version, replace. Mechanical work that would otherwise stall a refactor PR.
- Reverse-engineering an undocumented endpoint. You opened a website, looked at its network calls, copied the one you need as cURL. The converter strips out the `-v`, `-s`, `-o` noise and gives you a clean snippet to drop into a scraper.
- Onboarding into a new API. Reading 10 docs pages is slow. Pasting their example commands here and watching the body shape unfold across languages teaches you the API faster than the reference text.