⚡
usefultools.dev
curl

cURL Command Generator – bash, Windows, fetch, Python

NOUVEAU

cURL command generator: build a request with params, headers, auth and body, and get correctly quoted curl for bash, cmd and PowerShell plus fetch and Python.

Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.

Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.

Query parameters
Headers
Authentication
Body
Options

bash / zshrequest.sh

curl 'https://api.example.com/v1/users?notify=true' \
  -L \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"Ada Lovelace","note":"It'\''s a test"}'

The command contains your credentials. Do not paste it into tickets or chat.

⚡

Exemples rapides

Des entrées typiques et les résultats produits par cet outil.

bash
GET https://example.com + -L
curl https://example.com/ -L
Quoting
JSON {"note":"It's ok"}
--data-raw '{"note":"It'\''s ok"}'
fetch
Basic auth ada / secret
Basic YWRhOnNlY3JldA==
Check
Body {"a": 1,}
Invalid JSON body at line 1…
📖

Présentation

curl is the standard command-line HTTP client, but writing a command by hand means remembering flags and, above all, getting shell quoting right: a single apostrophe in a JSON body breaks a bash command, and Windows cmd needs a completely different escaping scheme. This cURL command generator builds the command from a form: method, URL, query parameters, headers, Basic or Bearer auth, a JSON, multipart, urlencoded or raw body, and options such as -L, -k, -v, --compressed and a timeout.

You get the same request as a bash/zsh command, a Windows cmd command, a PowerShell command using curl.exe, JavaScript fetch code and Python requests code. The JSON body is validated with line and column on error. Everything is generated in your browser and no request is sent.

Pourquoi utiliser cet outil ?

  • Correct quoting for bash, cmd and PowerShell
  • Same request as fetch and Python in one click
  • JSON body validated with line and column
  • Content-Type added automatically
  • Nothing is sent: the request is only built
⭐

Fonctionnalités

🧾

Params and headers tables

Add, disable or remove rows; query values are URL-encoded for you.

🔑

Basic and Bearer auth

Uses -u for Basic auth and an Authorization header for tokens.

📦

Four body types

JSON, multipart form (with @file uploads), x-www-form-urlencoded and raw text.

🐚

Shell-safe quoting

POSIX single quotes, caret-escaped cmd strings and PowerShell literal strings.

🔁

fetch and requests

Exports equivalent JavaScript fetch and Python requests code.

⚙️

curl options

Follow redirects, skip TLS checks, verbose, compressed and max time.

🛠️

Mode d'emploi

1

Set method and URL

Pick the HTTP method and enter the endpoint URL.

2

Add params and headers

Fill the query parameter and header rows; untick a row to skip it.

3

Choose auth and body

Select Basic or Bearer auth and a body type, then enter the body.

4

Pick an output

Switch between bash, Windows cmd, PowerShell, JS fetch and Python, then copy.

🤔

Questions fréquentes