curl Converter

Paste “Copy as cURL” from Chrome or Firefox to see the method, URL, headers, cookies and body in tables, then convert to 12 kinds of code. The request is never sent and everything runs in your browser. Authorization and cookies can be hidden before you share.

On-device・No uploadMobile friendlyWorks offlineBeta

Your files and input are processed only inside your browser on this device and are never uploaded to our servers.

Paste “Copy as cURL” from Chrome or Firefox (bash or Windows cmd), including multi-line \ ^ ` continuations. Nothing is sent and the request is never run.

How to use

  1. curl -X POST …

    Paste a curl command

  2. Parsed option tableWhat each option means

    Explain each option in a table

  3. Python, fetch, Go and more

    Convert to code

Read a curl command and convert it into code for other languages
  1. In your browser’s developer tools choose “Copy as cURL” and paste it into the input (or press “Try the sample”).

  2. Check the method, URL, query, headers and body under “Parsed request”, and see in “What each option means” whether each option is reflected in the code.

  3. Pick an “Output language”; the code appears right below.

  4. Before showing it to anyone, keep “Hide secrets for sharing” on (it starts on). A list of the secret-looking values found is shown.

  5. Press “Copy” or “Save” to take the code.

What it does

Reads what you paste as is

Understands bash \ line breaks, Windows cmd ^ breaks (Chrome’s “Copy as cURL (cmd)”), PowerShell ` breaks, $'…' strings, combined flags like -sSL, and --data-urlencode, --json, -F, -G and @file.

Options explained in a table

Every option found gets a meaning in Japanese and English and a mark for the generated code: applied, no effect or not supported. Options the tool does not know are shown as unknown rather than dropped silently.

Copy with secrets hidden

Replaces values with REDACTED when the name looks like Authorization, cookie, API key, password or token, or the value looks like a JWT or a GitHub, Stripe, AWS, Slack or Google key. It covers headers, query, JSON and form bodies, -u and proxy credentials, in the display, the generated code and the option table.

12 outputs

JavaScript (fetch), Node.js (fetch, axios), Python requests, PHP (cURL, Guzzle), Go net/http, Java HttpClient, C# HttpClient, Ruby Net::HTTP, wget and HTTPie. -k, -L, timeouts, proxies, Basic auth and multipart are carried over where each language can express them.

Nothing is sent or stored

The input is parsed in your browser and only code is displayed. The curl request is not run and what you paste is not sent to a server.

Use cases

  • Turn an API call that worked in the browser into Python, Node.js or Go code
  • Rewrite a curl example from documentation with the HTTP library you use
  • Look up what -k, -L, --compressed or -u mean in a curl command you were given
  • Paste a reproduction into chat or an issue tracker with Authorization and cookies hidden
  • Normalize bash and Windows cmd curl syntax into the same form

Capability matrix

FeatureSupportNotes
Parse method, URL, query, headers, cookies and body (JSON, form, multipart, @file)Supported—
Carry -u, --oauth2-bearer, -k, -L, --compressed, -x, -m and --connect-timeout into the codeSupported—
Copy code with Authorization, cookies, API keys and passwords hiddenPartialDetection is a guess from names (password, token, key …) and common key formats. Secrets in a custom format can be missed, so check by eye before sharing
Read the contents of @files or actually send the requestNot supportedFiles are not read and nothing is sent. Generated code only has the file path
Digest/NTLM auth, client certificates, --resolve, HTTP/3, AWS signingNot supportedMarked “not supported” in the table and not reflected in the code
Features limited by a language (browser Cookie header, wget multipart, Java -k …)PartialWhat cannot be written is explained in a comment in the generated code
curl config files (-K), several commands, or anything after a pipeNot supportedOnly the first curl command is parsed

Limits & notes

  • Input is limited to 100,000 characters.
  • Only the first curl command is parsed; everything after a pipe, ; or && is ignored. $variables and $(…) are kept as plain text, not expanded.
  • Generated code is a starting point. Add error handling, retries and encoding handling for your environment.
  • curl does not treat 4xx/5xx as errors, so libraries such as axios get settings that behave the same way.
  • Secret detection is a guess from names and formats. Finding nothing does not guarantee that nothing secret is present.

Privacy & safety

Parsing the pasted curl command and generating code happen entirely in your browser. The input and the generated code are never sent to or stored on a server, and the request is not run.

FAQ

How do I convert a curl command to Python?
Paste the curl command, then choose Python (requests) as the output language. A JSON body becomes the json= argument, auth becomes auth=, and -k becomes verify=False. Copy or save the result.
Can I convert curl to fetch or axios?
Yes: choose JavaScript (fetch), Node.js (fetch) or Node.js (axios). Browser fetch cannot set Cookie or User-Agent from JavaScript, so the generated code says so in a comment.
Does Chrome’s “Copy as cURL” include credentials?
Yes. Cookies, Authorization headers and API keys are usually included as they are. Keep “Hide secrets for sharing” on and review the detected list before you show the pasted content to anyone.
What do -k, -L and --compressed do?
-k skips TLS certificate verification (avoid it in production), -L follows redirects, and --compressed asks for a compressed response and decodes it. The table explains each option in your command and whether the generated code reflects it.
Does it read Windows cmd curl commands?
Yes: the ^" and ^ line-break format Chrome produces for cmd, PowerShell ` line breaks and bash \ line breaks.
Is my curl command sent to a server?
No. It is parsed only in your browser and the request is never run.

JSON Studio — Formatter & Validator

Paste JSON to format, minify or validate it instantly. Errors are shown with the exact line, column and cause, and comments or trailing commas can be auto-repaired. Your data never leaves your device.

No upload

Encode / Decode Studio — Base64, URL, JWT & more

Paste %E3%81%82, an eyJ… token or any encoded string — the format is detected and decoded instantly. Errors say exactly which character is wrong and why, and nothing leaves your browser.

No upload

Secret Scanner

Paste text or drop config and code files to list likely secrets with file, line and rule before you publish or share them. Values are masked by default and you can save a copy with them replaced by ***. A helper only — it cannot guarantee that nothing is missed.

No upload

OpenAPI Studio — Viewer & Validator

Paste an OpenAPI 3.0 / 3.1 or Swagger 2.0 definition to browse endpoints by tag and schemas as trees, and to check it against the official schemas with line and column. It never calls the API or fetches external files, and nothing leaves your device.

No uploadBeta

HAR Sanitizer

Load a HAR saved from your browser developer tools and save a copy with cookies, auth headers, URL tokens, passwords and JWTs redacted, before you send it to support. A helper only — it cannot guarantee that every secret is found. The HAR never leaves your device.

No uploadBeta

Docker Compose Studio

Convert docker run commands to compose.yaml, or compose.yaml back to docker run. A compose file is checked for syntax, the Compose Specification and common mistakes, and security points worth confirming are listed. Nothing is started or pulled, and your input never leaves your device.

No uploadBeta

Last updated: