cURL Formatter — Multi-line, fetch, HTTP/1.1

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

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

Developer notes

The supported subset is -X, -H, -d / --data-raw, -u, -b, --compressed, and the URL. Accepted input is cURL, Chrome fetch() that is parsed and never evaluated, a single-request .http file, or a raw HTTP/1.1 request. Axios, template literals, and multi-request .http files fail with a clear error. @file bodies and multipart -F fail with a clear error, so 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), HTTP/1.1, .http, JavaScript fetch, Python requests, Go net/http, or PHP curl_*. The parse is the same, with seven output formats.
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(), HTTP/1.1, or a .http file for a ticket or REST Client. 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

Back to the HTTP Tools hub. Percent-encode a component with URL Encode / URL Decode. For JSON payloads, use JSON Formatter and JSON Validator. For Bearer tokens, use JWT Decode. For Basic auth values, use Base64. For specs (OpenAPI / JSON Schema), see 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, HTTP/1.1, .http, 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.

Paste-local cURL, HTTP messages, URLs, HAR files, and Cookie / Set-Cookie headers — format and inspect in your browser, never sent.