SoftwareTestPilot
Free tool · 100% in-browser · no signup

cURL → Code Converter

Paste any cURL command and instantly export a Postman v2.1 collection, Playwright API test, Rest Assured (Java), k6 load test, Cypress, Python, Axios, fetch, HTTPie, or PowerShell — with checks, auth, and multipart handled correctly. Nothing leaves your browser.

Chrome DevTools cURL10 target frameworksSecret redactionMultipart + form + JSONNo signup
POSThttps://api.example.com/v1/users
3 headers2 query params0 cookiesbody: json
Detected secrets: Authorization, Bearer token
import { test, expect } from '@playwright/test';

test('POST https://api.example.com/v1/users', async ({ request }) => {
  const response = await request.post("https://api.example.com/v1/users", {
    headers: {
      "Content-Type": "application/json",
      "Authorization": "Bearer sk_live_abc123def456ghi789jkl012mno345",
      "Accept": "application/json",
    },
    params: {
      "active": "true",
      "role": "admin",
    },
    data: {
          "name": "Alice",
          "email": "alice@example.com",
          "roles": [
                "admin",
                "qa"
          ]
    },
  });
  expect(response.status()).toBeGreaterThanOrEqual(200);
  expect(response.status()).toBeLessThan(300);
});
Save as tests/api/*.spec.ts and run: npx playwright test.

Why this converter beats curlconverter.com and Postman's web importer

Test-framework targets

Not just clients — real Playwright, Rest Assured, k6, and Cypress output with assertions and thresholds pre-wired.

Local-only, secret-safe

Every generator runs in your browser. Detects Authorization / Cookie / X-API-Key and masks them in preview so you can screenshot safely.

Postman v2.1 collection

Not a text string — a valid collection JSON with folders, auth block, and pm.test scaffolding. File → Import in Postman.

Handles every body type

JSON (pretty-printed + validated), form-urlencoded, multipart (--form), and binary uploads — mapped to the framework's native API.

Chrome DevTools ready

Parses bash and PowerShell 'Copy as cURL' output — line continuations, --data-raw, --data-urlencode, --cookie all supported.

SEO-tuned & QA-focused

Built and maintained by SoftwareTestPilot's QA team — with tutorials on how each output fits into a real test suite.

Pair this with

cURL to code — frequently asked questions

1.Is this cURL to code converter free and safe for internal APIs?
Yes — 100% free, no signup, no ads, and no upload. The entire cURL parser and every code generator runs inside your browser (WASM-free, plain JavaScript). Your Authorization headers, cookies, tokens, and request bodies never touch our servers, so it's safe to convert internal, staging, and production API calls that you can't paste into hosted competitors like curlconverter.com or Postman's web importer.
2.Which output languages and frameworks are supported?
Ten targets in one click: Postman v2.1 collection JSON, Playwright API test (TypeScript), Rest Assured (Java, given/when/then), k6 (load-test JavaScript), Cypress (cy.request), Python requests, Node.js fetch, Axios, HTTPie, and PowerShell Invoke-WebRequest. Every generator handles headers, query params, JSON/form/multipart bodies, basic auth, and bearer tokens the same way your test framework expects.
3.Does it handle multi-line cURL from Chrome DevTools 'Copy as cURL'?
Yes. Paste the raw output from Chrome / Edge / Firefox DevTools → Network → right-click → Copy as cURL (bash or PowerShell) and the parser handles backslash line continuations, single-quoted headers, --data-raw JSON, --data-urlencode form fields, and --cookie flags. It also strips DevTools-only artifacts like -H 'sec-fetch-dest' so your generated test is clean.
4.Can it convert cURL to a Postman collection I can import?
Yes — the Postman output is a valid v2.1.0 collection JSON. Save it as request.json, then in Postman: File → Import → Upload. The request lands with the correct method, URL, headers, auth, and body, ready to run or add to a folder. This is faster than Postman's built-in 'Import cURL' when you need to save 20+ requests as a reusable collection.
5.How does the Playwright output compare to Playwright's built-in codegen?
Playwright codegen records browser interactions, not raw HTTP. This tool emits an API-only test using request.newContext() with your baseURL, headers, and body — the exact pattern documented for API testing in Playwright. Use it when you want to test a backend endpoint without a browser, or seed test data before a UI spec.
6.Does the k6 output include checks and thresholds?
Yes. Every k6 script comes with a default check() for the 2xx status, a threshold (http_req_failed rate<0.01, http_req_duration p(95)<500), and a configurable VUs / duration block at the top. Paste into k6 run script.js and you have a working load test in under a minute — no boilerplate hunting.
7.What makes this better than curlconverter.com?
Five things curlconverter.com and Postman's web importer don't offer: (1) test-framework targets (Playwright, Rest Assured, k6, Cypress) — not just clients; (2) Postman v2.1 collection export you can re-import; (3) automatic secret redaction preview (Authorization / Cookie / X-API-Key), so you can share the generated test safely; (4) inline body validation — JSON, form-urlencoded, and multipart are parsed and pretty-printed; (5) 100% local, so it works on air-gapped enterprise networks.
8.Does it detect and format JSON, form-urlencoded, and multipart bodies?
Yes. The parser inspects Content-Type and the raw body: application/json is pretty-printed and validated (line/col errors surfaced), application/x-www-form-urlencoded is parsed into a key/value map, and multipart/form-data --form fields are extracted into a fields[] array your test framework can iterate. Binary uploads (--data-binary @file.bin) are represented as a file placeholder with the original path preserved as a comment.