Paste a curl command, get a real working ApiClient class in 6 languages
class ApiClient { async makeRequest() { const response = await fetch("https://api.example.com/v1/orders", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_TOKEN", }, body: "{\"order_id\":\"A100\",\"total\":42.5}", }); return response.json(); }} const client = new ApiClient();client.makeRequest().then((data) => console.log(data));Parses real curl syntax directly (quoted strings, multi-line \ continuations, --flag=value and --flag value forms) — not full shell scripting (no variable expansion or command substitution). Output is a reusable ApiClient class, not a bare inline script.
Paste your curl command
From devtools' "Copy as cURL", Postman, or an API doc's example.
Pick a language
JavaScript, Python, PHP, or Go.
Copy the generated code
Headers, body, and auth are already mapped in.
Paste a curl command — copied from your browser's devtools ("Copy as cURL" on a network request), Postman, or an API's documentation — and get back a real, working ApiClient class in JavaScript (fetch or axios), Python (requests or the stdlib http.client), PHP (cURL or Guzzle), Go, Java (java.net.http), or C# (HttpClient).
Handles what real curl commands actually look like: quoted strings, multi-line commands with \ continuations, both --flag value and --flag=value forms, custom headers, JSON/form bodies, Basic auth (-u), cookies, and more. If a flag isn't recognized, it's called out explicitly rather than silently dropped — the rest of the request (URL, method, headers, body) still converts correctly around it.
Everything runs in your browser — nothing you paste is uploaded, which matters here more than most tools: a real "copy as cURL" often contains live session cookies or auth tokens.
The most common way: open your browser's devtools (F12), go to the Network tab, right-click any request, and choose "Copy as cURL". API documentation pages also frequently show a curl example you can paste directly.
JavaScript (fetch or axios), Python (requests or the stdlib http.client), PHP (cURL or Guzzle), Go, Java (java.net.http), and C# (HttpClient) — pick both the language and the library from the pickers above.
Yes — -d, --data, --data-raw, --data-binary, and --json are all recognized and mapped into the equivalent body parameter for each language.
Yes, with real working code per language — not a placeholder comment. JavaScript generates a genuine btoa(...) call, Python uses requests' auth=(user, pass) tuple, PHP sets CURLOPT_USERPWD, and Go calls req.SetBasicAuth(...).
It's called out explicitly in a warning listing exactly which flag(s) weren't understood — the rest of the request (URL, method, headers, body) still converts correctly around it. This is a deliberately bounded tool, not a full shell interpreter: it doesn't support variable expansion, command substitution, or every one of curl's 200+ flags, only the common ones "copy as cURL" and typical API docs actually produce.
Yes — the `\` line-continuation style real "copy as cURL" output uses (a backslash at the end of a line, continuing on the next) is joined back into one command before parsing.
That's a real, worth-knowing risk, and it applies to wherever you paste it, not just here: a "copy as cURL" from a real logged-in session often includes your actual session cookie or auth token — sharing that command with someone else is effectively sharing your login. This tool processes it entirely in your browser and uploads nothing, but the same caution applies before pasting it anywhere, including into a chat or a bug report.
An honest scope choice — a smaller set of languages, each with a real library choice where one exists (JavaScript: fetch or axios; Python: requests or the stdlib http.client; PHP: cURL or Guzzle), and every one generates a real, reusable ApiClient class rather than a bare inline script. If you need a language not listed here (like Rust or Kotlin), curlconverter.com covers a much wider set.
--data/--data-raw/--data-binary/--data-urlencode are all treated as the request body (matching how curl itself sends them). --form (-F) is recognized as a multipart/form submission specifically.
No — parsing and code generation both happen entirely in your browser.
Yes — a library picker appears next to the language picker when you choose JavaScript, letting you switch between fetch and axios. Python and PHP have their own library choice too (requests or stdlib http.client; cURL or Guzzle).
No — that's a different, separate problem (Postman's own Collection JSON format, not a programming language) from what this tool does. Postman itself already has this built in: use Import → paste your curl command directly into Postman, or use Postman's own "Code" button on a saved request to get a curl command back out.
Every language generates a real ApiClient class (a struct with a method, for Go) with a makeRequest() method, not a bare top-level script — a more reusable starting point for dropping into an actual project, closer to what a real API client file looks like.
Yes — Java uses the built-in java.net.http.HttpClient (no extra dependency needed, Java 11+), and C# uses the built-in System.Net.Http.HttpClient. Both generate a real, compilable class with Basic auth handled correctly (Base64-encoded Authorization header).
Build, test, and understand cron expressions — a plain-English description, the next 10 run times, and one-click presets. Supports both standard 5-field cron and 6-field Quartz syntax (with seconds). Free, works entirely in your browser.
Paste JSON and generate class or struct definitions in TypeScript, Java, Go, Python, C#, Kotlin, or C++ — with explicit control over field and class naming convention, and real nested-class generation. Free, works entirely in your browser.
Comprehensive token tool to decode, verify, and generate JWT (JSON Web Tokens) and PASETO (Platform-Agnostic SEcurity TOkens) instantly. View header, payload, and signature sections with syntax-highlighted JSON. Generate new tokens with custom payloads. Perfect for developers debugging authentication tokens, API tokens, and bearer tokens. Features instant real-time decoding as you type, support for both JWT and PASETO token formats, token generation with custom algorithms (HS256, HS384, HS512), three-part visualization showing header/version, payload, and signature/footer separately, color-coded JSON syntax highlighting for easy reading, one-click copy to clipboard for each section, and complete client-side processing for maximum security. All token processing happens entirely in your browser - tokens are never transmitted to any server, ensuring complete privacy and security. Supports all standard JWT formats and PASETO v2/v4. Ideal for debugging authentication flows, inspecting API tokens, generating test tokens, understanding token structure, validating token claims, and learning about modern authentication. No installation or registration required.