Free load test converter

Convert OpenAPI to a k6 load test

Paste your OpenAPI or Swagger spec and get a clean, runnable k6 script you can run in the cloud in seconds.

Converts in your browser. Your request never leaves this page.
Paste or upload
Generated k6 script
Your runnable k6 script will appear here.

Everything you need to load test a real request

Paste a real request and get a k6 script that actually runs. No boilerplate, no signup, and your data never leaves the browser.

Ready in seconds

Paste and convert instantly. The k6 script is generated in your browser the moment you click, with no waiting.

🔒
Private by default

Nothing is uploaded. Your request, headers and tokens never leave this page, so it is safe for internal APIs.

🔑
Secrets kept out

Cookies, tokens and auth headers are pulled into k6 __ENV variables instead of being hard-coded into the script.

Run it in the cloud

Copy the k6 script into your project, or sign up free to run it as a real load test from multiple regions.

Turn your OpenAPI spec into a load test

An OpenAPI 3 or Swagger 2 spec describes every endpoint of your API, including paths, methods and parameters. Convert an OpenAPI spec to k6 to generate a load test that covers each documented operation without hand-writing requests. It is the fastest route to broad API coverage when your specification is your source of truth.

What the generated k6 script includes

  • HTTP method and full URL
  • All request headers
  • Request body as JSON, form or raw
  • Query parameters, correctly encoded
  • Auth and tokens parameterised to __ENV
  • Multiple requests grouped and ready to run

How it works

1Paste or uploadDrop in your cURL command, HAR capture, Postman collection or OpenAPI spec, or upload the file.
2Get a k6 scriptEvery request becomes a clean, runnable k6 script with checks, headers and body already in place.
3Run itCopy it into your repo and run k6 locally, or run it as a real cloud load test with LoadFocus.

Writing k6 by hand vs this converter

See how much time and effort the converter saves compared with scripting k6 from scratch.

Writing k6 by handThis converter
Time to first scriptHours of reading docs and writingSeconds, just paste and convert
Headers, method and bodyEasy to miss or mistypePreserved exactly from your input
Secrets and tokensOften hard-coded by mistakePulled into k6 __ENV variables
k6 knowledge neededYou must know k6 scriptingNone, the script is ready to run
CostFree, but it costs your timeFree, runs in your browser

Frequently asked questions

Is my data safe?

Yes. Conversion runs entirely in your browser in JavaScript. Your request, headers and secrets are never sent to our servers, so it is safe to use with internal or authenticated APIs.

What is k6?

k6 is a popular open-source load testing tool that runs scripts written in JavaScript. The scripts this converter generates run in k6 as they are.

Can I run the generated script?

Yes. Copy it into a .js file and run it with k6, or click Run in the cloud to sign up free and run it as a real load test from multiple regions.

How are secrets and tokens handled?

Authorization headers, cookies and API tokens are parameterized to k6 __ENV variables rather than hard-coded, so you can pass them safely at run time.

Which inputs are supported?

A cURL command, a HAR capture from your browser network tab, a Postman v2.1 collection, or an OpenAPI 3 or Swagger 2 spec. Multiple requests are converted together.

Other converters

×