---
title: "curl to Node.js Converter - Axios Code Generator"
description: "Convert curl commands to Node.js axios code online. Headers, cookies, auth, proxies, and form-data uploads translated in your browser. Free, no signup."
url: https://webscraping.ai/tools/curl-converter/node
markdown_index: https://webscraping.ai/llms.txt
---
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.

curl command

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.

```python

```

## 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. Shown with the [official client library](https://webscraping.ai/docs#sdks) of your choice:

```bash

```

[Get a Free API Key](https://webscraping.ai/auth/sign_up)[View API Documentation](https://webscraping.ai/docs)

2,000 free API credits · No credit card required

Convert curl to other languages: [curl to Python](https://webscraping.ai/tools/curl-converter/python)[curl to JavaScript](https://webscraping.ai/tools/curl-converter/javascript)[curl to PHP](https://webscraping.ai/tools/curl-converter/php)[curl to Go](https://webscraping.ai/tools/curl-converter/go)[curl to Java](https://webscraping.ai/tools/curl-converter/java) · [all languages](https://webscraping.ai/tools/curl-converter)

## 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

[JavaScript scraping libraries](https://webscraping.ai/blog/javascript-web-scraping-libraries): Cheerio, Puppeteer, Playwright, and friends compared.

[Web scraping with JavaScript](https://webscraping.ai/blog/web-scraping-with-javascript): Fetching, parsing, and scraping dynamic pages in JS.

[curl commands for scraping](https://webscraping.ai/blog/curl-commands-for-web-scraping): The curl options that matter for scraping, explained.

## Node code ready? Make it unblockable.

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

[Start Free Trial](https://webscraping.ai/auth/sign_up)[View API Documentation](https://webscraping.ai/docs)
