Conversor de Comandos Curl

Converta comandos curl para código pronto para produção em JavaScript, Python, Go, PHP, Java e C#

Target Language

Conversor de Comandos Curl

Converta comandos curl para código pronto para produção em JavaScript, Python, Go, PHP, Java e C#

Recursos

  • Convert `curl` commands to JavaScript fetch, Python requests, Node http, PHP cURL, Ruby net/http
  • Parses `-X` (method), `-H` (headers), `-d` / `--data` (body), `-u` (basic auth), `--cookie`, `-k` (insecure)
  • Quoted arg parsing (single and double, with escape handling)
  • Multipart / file uploads (`-F`) are NOT supported in this version — single body / form-urlencoded only
  • Runs entirely in your browser

Como usar

  1. Paste your curl command in the input field.
  2. Select the target programming language.
  3. Click Convert to generate the code.
  4. Copy the result and use it in your project.

Dicas e Melhores Práticas

  • Single-line curl commands work cleanly; multi-line curl with backslash continuations should be joined into one line first.
  • For `-F` (multipart form data) and file uploads, the conversion isn't implemented — use Postman / Insomnia's code generator for those.
  • The output uses the target language's idiomatic HTTP client (axios / requests / etc.). Adapt to your project's library if different.
  • Cookies and auth are translated explicitly so the converted code matches the curl semantics one-to-one.
  • Verbose flags (`-v`, `--verbose`) are dropped — they're for debugging, not for production code.

Perguntas Frequentes

What curl options are supported?

The converter supports -X (method), -H (headers), -d/--data (request body), -u (basic auth), -k (insecure), and multiline commands with backslash continuation.

Can I convert multiline curl commands?

Yes, curl commands with backslash line continuation (\) are automatically handled and joined before parsing.

Is my data private?

Yes, all conversion happens in your browser. No curl commands or API credentials are sent to any server.