cURL Converter

Convert a portable cURL request into copy-ready Fetch code locally.

About this tool

Convert cURL commands to Fetch without sending a request

Turn a bounded, portable cURL command into readable JavaScript Fetch source entirely in your browser. Kitland parses the command but never executes it, sends a network request, reads a local file, stores the payload, or adds it to the URL.

How to use it

  1. Paste a cURL command that starts with curl and contains one absolute HTTP or HTTPS URL.
  2. Review the live Fetch result, including its method, ordered headers, query data, and optional body.
  3. Copy the generated JavaScript after checking credentials and request data for secrets.

Useful for

  • Translate an API documentation example into Fetch code for a browser or JavaScript project.
  • Preserve repeated headers and body fragments while reviewing how a request maps to Fetch.
  • Inspect a request locally before moving a sanitized version into source code or a test fixture.

Frequently asked questions

Which cURL options are supported?

The converter supports request method, headers, inline data, Basic authentication, HEAD, GET query transfer, --url, and one positional HTTP or HTTPS URL. Common transport-only flags such as --silent, --location, and --compressed are ignored; other options are rejected.

Will the converter read @file request bodies?

No. File-backed -d, --data, --data-raw, and --data-binary values are rejected because this local converter cannot and should not read the referenced file.

Does converting a cURL command send the request?

No. Parsing and formatting are synchronous and local. The generated Fetch source is displayed as text and is never executed by Kitland.

Are Basic authentication credentials safe to paste?

The conversion stays on this device, but Basic authentication is only encoding, not encryption. Treat the generated Authorization header as sensitive and use HTTPS when you eventually send it elsewhere.

What are the cURL converter limits?

Input is limited to 100,000 JavaScript UTF-16 code units and 1,000 parsed tokens so conversion remains predictable and responsive.