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

Postman Collection → Code Converter

Convert any Postman collection into a full Playwright, Rest Assured, k6, Cypress, Supertest, Python (pytest), or Karate test suite — with folders, pm.test assertions, auth, and environments preserved. Runs 100% in your browser.

v2.0 + v2.1 supportFolder-preserving describe blockspm.test → framework assertionsEnvironment file upload8 target frameworksNo upload, no signup
Sample API
2 requests1 folders2 pm.test blocks2 variablesauth: bearer
import { test, expect } from '@playwright/test';

test.describe("Sample API", () => {
    test.describe("Users", () => {

      test("List users", async ({ request }) => {
        const response = await request.get(`${process.env.BASEURL ?? ""}/v1/users?active=true?active=true`, {
        headers: {
          "Accept": `application/json`,
          "Authorization": `Bearer ${process.env.AUTHTOKEN ?? ""}`
        }
        });
        expect(response.ok()).toBeTruthy();
        expect(response.status()).toBe(200);
        // Assert response time < 500ms (measure with performance.now())
      });

      test("Create user", async ({ request }) => {
        const response = await request.post(`${process.env.BASEURL ?? ""}/v1/users`, {
        headers: {
          "Content-Type": `application/json`,
          "Authorization": `Bearer ${process.env.AUTHTOKEN ?? ""}`
        },
        data: {
          "name": "Alice",
          "email": "alice@example.com",
          "role": "admin"
        }
        });
        expect(response.ok()).toBeTruthy();
        const json = await response.json();
        expect(response.status()).toBe(201);
        expect(json.email).toBe("alice@example.com");
      });

    });
});
Save as tests/api/collection.spec.ts and run: npx playwright test.

Why this beats Postman's built-in code snippet and every online converter

Whole-collection conversion

Postman's snippet handles one request at a time. This tool converts hundreds of requests, preserves nested folder structure, and turns them into runnable describe/scenario blocks.

Real test-framework output

Playwright test blocks, Rest Assured @Test methods, k6 groups + thresholds, Cypress it() blocks — not just an HTTP client call.

Local-only, secret-safe

Every parser and generator runs in your browser. Your collections and environment files never leave the page — safe for internal APIs.

pm.test → assertions

Translates pm.response.to.have.status(), pm.expect(json.x).to.eql(), response time, headers, and body checks into idiomatic per-framework asserts.

Handles every body type

raw JSON, urlencoded, formdata, GraphQL, and file uploads — mapped to Playwright's data/form, Rest Assured .body(), k6 JSON.stringify, and more.

Environment file support

Upload a Postman environment.json — values inline into code, or emit process.env / __ENV / Cypress.env references you can override in CI.

How to convert a Postman collection in 4 steps

STEP 1

Export your Postman collection

In Postman, right-click the collection → Export → Collection v2.1 (recommended). Optionally export an environment as well (Environments → Export).

STEP 2

Upload or paste the JSON

Drop the .postman_collection.json file into the left panel (or paste the JSON). The tool auto-detects v2.0/v2.1, folders, auth, variables, and pm.test scripts.

STEP 3

Pick a target framework

Choose Playwright, Rest Assured, k6, Cypress, Supertest, Python (pytest), Karate, or a cleaned Postman collection. The output updates instantly with folder structure preserved.

STEP 4

Copy, download, or download the full suite

Copy one file, download the current file, or download the full suite as a ZIP with per-folder files plus a runnable config (playwright.config.ts / pom.xml / cypress.config.js).

Pair this with

Postman to code — frequently asked questions

1.Is this Postman collection converter free and safe for private collections?
Yes — 100% free, no signup, no upload. The entire Postman v2.1 parser and every code generator runs inside your browser (plain JavaScript, no server round-trip). Your Authorization headers, tokens, environment secrets, and request bodies never leave the page, so it is safe to convert internal, staging, and production collections that you cannot paste into any hosted competitor.
2.Which frameworks can it export to?
Eight targets in one click: Playwright API test suite (TypeScript, one file per folder), Rest Assured (Java, JUnit 5, given/when/then), k6 load test with scenarios + thresholds, Cypress (cy.request + expect), Supertest (Node/Jest), Python requests (pytest), Karate DSL, and a Newman-ready collection (cleaned + re-exported). Every generator preserves your folder structure, request names, headers, auth, body type (raw/JSON/urlencoded/formdata/GraphQL), path/query variables, and pm.test assertions.
3.Does it convert pm.test scripts and assertions?
Yes. The parser reads each request's `event.test.script.exec[]` and translates common `pm.test`, `pm.response.to.have.status`, `pm.expect(json.xxx)`, and `pm.response.to.have.jsonBody` patterns into idiomatic assertions per framework — `expect(response.status()).toBe()` for Playwright, `.then().body(...)` for Rest Assured, `check()` for k6, and `expect(response.body)` for Cypress/Supertest. Non-standard scripts are preserved as comments so you never lose intent.
4.How does it handle Postman variables and environments?
Collection-level `{{baseUrl}}`, folder-level, and request-level variables are all detected. You can upload an optional `environment.json` — its values are inlined by default, or you can toggle 'Keep as variables' to emit `process.env.BASE_URL` (Playwright/Node), `${baseUrl}` config (Rest Assured), `__ENV.BASE_URL` (k6), or `Cypress.env('baseUrl')`. Path variables like `/users/:id` become framework-native params, not raw strings.
5.Does it support v2.0 collections, folders, and nested folders?
Yes — v2.0 and v2.1 schemas are auto-detected and normalised. Nested folders become nested `test.describe()` blocks in Playwright, `@Nested` classes in Rest Assured (JUnit 5), grouped scenarios in k6, and folder-named describe/context blocks in Cypress. Request order is preserved, and duplicate names are auto-suffixed so nothing collides in your test runner.
6.What auth types are supported?
All the common ones: Bearer token, Basic auth, API Key (header or query), OAuth 2.0 access-token flow, AWS Signature (as a documented header), Digest, and NTLM (as a Rest Assured config note). Auth defined at the collection root is applied to every child request unless the child overrides it — exactly like Postman does at runtime.
7.Can I download the whole suite as a ZIP?
Yes. For Playwright, Rest Assured, and Cypress, a single 'Download suite' button packages one file per folder plus a ready-to-run config (`playwright.config.ts`, `pom.xml` snippet, or `cypress.config.js`) so you can drop it straight into your repo. k6, Supertest, Python, and Karate export as a single scenario file.
8.How is this better than Postman's built-in code snippet?
Postman's snippet only converts one request at a time to a single-language HTTP client (fetch, curl, Python requests) — it cannot emit a real test framework, cannot preserve folders, cannot translate pm.test assertions, and cannot handle multi-request suites. This converter takes your entire collection and gives you a suite that actually runs in CI: with test names, describe blocks, assertions, thresholds, and environment wiring.
9.Does it work offline?
Yes. Once the page has loaded, no network requests are made. You can disconnect Wi-Fi and continue converting — ideal for air-gapped enterprise networks, on-call debugging, and QA teams on regulated stacks (finance, healthcare, government).