curl Command Builder
Fill in the URL, method, headers and body and get a ready to run curl command. JSON and form bodies set the right Content-Type, and every value is safely single-quote escaped.
How to build a curl command
- Enter the URL and choose the HTTP method.
- Add any headers and a request body, picking raw, JSON or form.
- Toggle flags like follow redirects, then copy the command.
Examples
GET with a header
GET https://example.com, Accept: application/json
curl -H 'Accept: application/json' 'https://example.com'
POST JSON
POST https://api.example.com with {"name":"Ada"}curl -X POST -H 'Content-Type: application/json' --data '{"name":"Ada"}' 'https://api.example.com'Frequently asked questions
Does it set the Content-Type automatically?
Yes. A JSON body adds application/json and a form body adds application/x-www-form-urlencoded, unless you already supplied a Content-Type header yourself.
How are values with spaces or quotes handled?
Every header, body and URL is wrapped in single quotes with embedded single quotes escaped, so the command pastes safely into a POSIX shell like bash or zsh.
What is the difference between raw, JSON and form bodies?
Raw and JSON send the body with --data, while form uses --data-urlencode. JSON and form also set a matching Content-Type for you.
What do the -k, -L and compressed options do?
-k skips TLS certificate verification, -L follows redirects, and --compressed requests a gzip or brotli encoded response that curl decompresses.
Is anything sent to a server?
No. The command is assembled entirely in your browser, so your URL, headers and body never leave your device.
Related tools
curl to code
Paste a curl command and get clean JavaScript fetch and Python requests code. Parses method, headers and body. Runs in your browser.
HTTP Header Builder
Build CORS, cache and security response headers, then copy them as raw HTTP, Nginx add_header or Apache Header set lines. Runs in your browser.
URL Parser
Parse a URL into protocol, host, port, path, query and hash. See every query parameter in a clean table. Free, private and runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.