FREE TOOL

curl to Node.js Converter

Paste a curl command, get working Node.js axios code — headers, cookies, auth, proxies, timeouts, and uploads translated. Runs in your browser, no signup.

Conversion runs entirely in your browser — the command (and any tokens or cookies in it) is never sent to a server. Tip: DevTools Network tab → right-click a request → Copy as cURL.

Scraping a real site? Skip the blocks

Hand-copied curl headers go stale, and sites still block datacenter IPs. The same request through the WebScraping.AI API gets rotating proxies, headless Chrome rendering, and unblocking in one call — your custom headers and cookies are forwarded via the headers parameter:

2,000 free API credits · No credit card required

What the generated axios code does

The output uses axios method shortcuts (axios.get, axios.post, …) with an options object: -H headers and -b cookies go into headers, -u becomes the auth option, -x the proxy host/port object (something fetch can't do at all), -m a millisecond timeout, and -F uploads use the form-data package with fs.createReadStream. JSON bodies are passed as plain objects — axios serializes them and sets the Content-Type itself, and response.data comes back parsed.

Unlike browser JavaScript, Node lets you send any Cookie or User-Agent header verbatim — which is exactly what a scraper copied from DevTools needs.

Frequently asked questions

How do I convert a curl command to Node.js?

Paste the command into the converter above — it outputs axios code instantly, in your browser. Headers, cookies, JSON and form bodies, basic auth, proxies, timeouts, and multipart uploads are translated. Nothing you paste is sent to a server. For dependency-free code, pick JavaScript (fetch) in the dropdown instead.

Why axios instead of Node's built-in fetch?

Both work. axios adds what scrapers commonly need: first-class proxy support, automatic JSON parsing, interceptors for retries, and request/response transforms. Node 18+ fetch needs no install but requires undici's ProxyAgent for proxies. The tool generates either — switch the dropdown.

How do I send multipart file uploads from Node?

The generated code uses the form-data package with fs.createReadStream for -F file fields, passing the form object as the request body. Install it with npm install form-data — Node's built-in FormData works too but reads whole files into memory.

The Node code gets a 403 that my browser doesn't — why?

Anti-bot systems look past headers: Node's TLS fingerprint, your server's IP reputation, and JavaScript challenges all give it away. Copied cookies also expire. The durable fix is running the request through rotating proxies and real headless Chrome — one call to the WebScraping.AI API.

Related

Node code ready? Make it unblockable.

Same request, plus rotating proxies, headless Chrome, and JS rendering — one API call from Node.js.

Icon