cURL Formatter — Multi-line, fetch, Python requests

Paste Chrome Copy as cURL and get a readable multi-line command, a one-liner, JavaScript fetch, or Python requests. Sanitize Cookie, Authorization, sec-ch-*, and Referer before you share. 100% in your browser — FastMinify never sends the request.

Loading…
cURL Formatter
Paste Chrome, Firefox, or Safari Copy as cURL. Get readable multi-line cURL, a one-liner, JavaScript fetch, Python requests, Go net/http, or PHP curl_* output. Not a 30-language converter and not a request runner.

Developer notes

• Subset: -X, -H, -d / --data-raw, -u, -b, --compressed, and the URL. • @file bodies and multipart -F fail with a clear error — paste the body inline. • Sanitize (off by default) strips Cookie, Authorization, headers starting with sec-ch-, and Referer. • JSON bodies are indented in multi-line cURL when the payload parses as JSON. • FastMinify never fetches the pasted URL.

Options

Layout
Multi-line (default) or one-line. Applies to cURL and all code outputs.
Language
cURL (default), JavaScript fetch, Python requests, Go net/http, or PHP curl_* — same parse, five emit shapes.
Sanitize secrets
When on, omit Cookie, Authorization, sec-ch-*, and Referer from the formatted copy. Default off.

When this is the right tool

• Share a DevTools capture without a 400-character one-liner. • Turn the same paste into fetch() or Python requests for a ticket. • Strip Cookie and Authorization before pasting into Slack or a gist.

Worked examples

Chrome one-liner → multi-line

Before

curl 'https://api.example.com/v1/items' -H 'accept: application/json' --data-raw '{"ok":true}'

After

curl 'https://api.example.com/v1/items' \ -H 'accept: application/json' \ --data-raw '{ "ok": true }'

Sanitize Cookie before copy

Before

curl 'https://api.example.com' -H 'cookie: session=abc' -H 'authorization: Bearer tok'

After

Those two headers are omitted from the formatted copy when Sanitize secrets is on.

Related HTTP and encoding tools

Hub: HTTP Tools. Percent-encode a component with URL Encode / URL Decode. JSON payloads: JSON Formatter and JSON Validator. Bearer tokens: JWT Decode. Basic auth values: Base64. Specs (OpenAPI / JSON Schema): API & schema tools.

cURL Formatter FAQ

Paste-local DevTools cURL — never sent

Does FastMinify send the request?

No. There is no Send button, no runner, and no proxy. The pasted command stays in your browser.

Is this a curl converter?

No. The page is a formatter: readable cURL, one-line cURL, JavaScript fetch, Python requests, Go net/http, and PHP curl_*. It is not a 30-language converter.

Which flags are supported?

The DevTools subset: -X, -H, -d / --data-raw, -u, -b, --compressed, and the URL. @file and multipart -F are rejected with an error.

What does Sanitize secrets remove?

Cookie, Authorization, any header whose name starts with sec-ch-, and Referer. The switch is off by default so you can inspect the original paste first.

HTTP Tools

Paste-local cURL, HTTP messages, and URLs — format and inspect in your browser, never sent.

Explore other tool categories

Minify

Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.

Beautify

Make code readable with consistent indentation — beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.

Unminify

Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.

Conversion

Transform data between JSON, YAML, XML and CSV locally — no server uploads.

CSS preprocessors

Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.

JSON Tools

Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.

SVG Tools

Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.

DevOps & Infra

Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.

CI/CD

GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.

Logs & observability

Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.

Kubernetes

Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.

Networking / IP

CIDR, subnets, and IPv4/IPv6 helpers — in your browser.

Security & tokens

JWKS, X.509 certificates, and secrets scan — browser-local.

API & schemas

OpenAPI tools to format, validate, and lint your specs.

Encoding

Encode or decode Base64, URL components and HTML entities — client-side only.

Developer utilities

Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.

Text & Markdown

Count words, build Markdown TOCs, and clean line lists — all in your browser.

AI & LLM

Token counting, pricing estimates, and context-window fit — 100% browser-local.

Test Data

Synthetic field values for fixtures and DB seed — reserved-range phone numbers first.

Serialization

Serialize and deserialize PHP data structures beside JSON workflows.