Skip to tool
All tools

cURL / HTTP request tool

A cURL command as a form, and as fetch, axios or Python.

Questions

What does this tool do?

The cURL / HTTP request tool reads a cURL command — the one from a browser's Copy as cURL, an API's docs, a colleague's message — into a form you can edit: method, URL, headers, body, auth. From the form it writes the request four ways, each ready to copy: cURL tidied up, fetch, axios and Python requests; the request itself is never sent.

Which cURL options does it read?

The method, headers, cookies, user agent and referer; every form of data — -d, --data-raw, --data-binary, --data-urlencode, --json — and multipart forms with -F; basic auth with -u; -G, -L, -k and --compressed; the URL with or without --url. Single and double quotes, backslash escapes, lines continued with a backslash, attached values like -XPOST, --long=value and bundles like -sSL are all read. Options that do not change the request — silence, verbosity, output files, timeouts, proxies — are read and ignored.

Does it send the request?

Never. There is no Send button and no network call; the page turns one text into another, so a token or a cookie in the command goes nowhere. To run the request, copy the output into your terminal, browser console, script or notebook.

Where do I get a cURL command?

From the browser: open DevTools, the Network tab, right-click the request and choose Copy as cURL. Everything the page sent — headers, cookies, body — comes with it, which is why it is worth reading before you share it.

How is the body written in each language?

When the body is JSON and the content type says so, fetch writes it as JSON.stringify({...}), axios as a data object and Python as json={...}. Other bodies are passed as strings, and -u becomes an Authorization header in fetch, the auth option in axios and auth=(user, password) in Python, with the credentials as you typed them.

What happens to files in -F?

The form comes out as FormData in fetch and axios and as data= and files= in Python. A file field (@path) cannot travel through a text: JavaScript gets a placeholder that expects a file input, and Python gets open(path, "rb") with the path from the command.

Related tools