curl Command Builder: Make GET and POST Requests with Headers and JSON
Fill in the address, method, headers and body to get a ready curl command for Linux, macOS, PowerShell or Command Prompt.
Fill in the form and the curl command appears below, quoted correctly for your command line. Add headers, a JSON body, a bearer token or basic login, and common options such as following redirects.
What it does
- Builds GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS requests.
- Adds the JSON headers for you and warns if the body is not valid JSON.
- Quotes everything correctly for bash, PowerShell or Command Prompt.
- Supports bearer tokens, basic login, user agent, time limit, saving to a file and the most used flags.
- Warns about risky choices, such as sending a login over plain http or skipping certificate checks.
Frequently asked questions
- Why is the body missing for GET?
- A GET request normally has no body, so the tool leaves it out and tells you. Choose POST, PUT or PATCH to send one.
- Why does my JSON fail on Windows?
- Command Prompt and older PowerShell remove double quotes inside arguments. Save the body to a file and use --data @body.json, or use PowerShell 7.
- What does -L do?
- It tells curl to follow redirects, which is useful when a web address moves to https or to another host.
- Is my token sent to this site?
- No. The command is built in your browser. Still, avoid sharing a command that contains a real token.
More tools
Code formatters
CSS beautifier CSS minifier HTML beautifier HTML minifier JavaScript beautifier JavaScript minifier JSON formatter YAML formatter XML formatter SQL formatter Markdown preview
Converters
Base64 encoder and decoder URL encoder and decoder Unix timestamp converter CSV to JSON JSON to CSV HTML entity encoder and decoder Number base converter Time zone converter JSON to TypeScript XML to JSON HTML to Markdown Date difference calculator
Text tools
Regex tester Remove duplicate lines Lorem ipsum generator Word counter Case converter Text diff checker
Color and images
Color converter Contrast checker Image to Base64 Image resizer
Network
Subnet calculator Download time calculator Common ports list CIDR to IP range IPv6 address expander and compressor MAC address formatter
Server and files
Cron expression explainer chmod calculator HTTP status codes
Encoding and security
Password generator UUID generator Hash generator JWT decoder QR code generator Password strength checker Wi-Fi QR code generator