Paste any OpenAPI 3.x or Swagger 2.0 spec (JSON or YAML) and instantly get copy-ready curl commands for every endpoint. Supports Bearer auth, Basic auth, and API key schemes. 100% client-side — your spec never leaves the browser.

OpenAPI to cURL is a free, browser-based tool that converts any OpenAPI 3.x or Swagger 2.0 specification into ready-to-run curl commands — one per endpoint, instantly. Paste your spec, pick an endpoint, copy the curl command. No signup, no server, no uploads. Your API spec never leaves the browser.
Testing an API shouldn't require Postman installed, a collection configured, and an environment set up before you can make a single request.
Most developers have the API spec — Swagger UI, a JSON file, a YAML in the repo. What they don't have is a fast path from "spec exists" to "curl command I can run right now." Writing curl commands by hand from an OpenAPI spec is error-prone: paths have parameters, bodies have schemas, security schemes have different auth header formats, and a single mistake means a 401 or a 400 response that sends you back to reading documentation.
The alternative — importing into Postman, Insomnia, or Bruno — is 3–5 clicks minimum. That's fast enough once the collection is set up, but it's the wrong tool when you need one curl command to test one endpoint before a code review.
Paste any OpenAPI 3.x or Swagger 2.0 JSON or YAML spec directly into the input box. Load a Petstore example with one click to try it immediately.
All paths and methods from the spec appear as a scrollable list. Filter by HTTP method (GET, POST, PUT, PATCH, DELETE) or search by path or summary text. Large specs with hundreds of endpoints stay navigable.
Select any endpoint and the tool generates the full curl command:
-X GET, -X POST, etc.)Accept: application/json header by defaultEnter your actual token in the auth token field and the generated curl command updates instantly — no copy-paste-search-replace.
Copy the current endpoint's command with one click, or download every endpoint as a ready-to-run shell script.
{petId} becomes an example value in the URLThe tool parses specs entirely in the browser using JSON.parse for JSON input and js-yaml for YAML input. Path and query parameters are extracted from the operation and path item objects. Request body schemas are walked to generate example JSON values. Security schemes from components.securitySchemes (OpenAPI 3.x) and securityDefinitions (Swagger 2.0) are read to emit the correct auth header format.
The shell script download uses the Blob API and a temporary anchor element — no server, no file upload.
You're integrating a third-party API. The docs have a Swagger UI. Instead of clicking "Try it out" in the browser or importing to Postman, paste the spec, pick the endpoint you're integrating, get the curl command, and run it from the terminal to verify the response structure before writing a single line of code.
A team member's API change broke something. The PR includes the updated OpenAPI spec. Paste the spec, find the changed endpoint, run the generated curl command against staging, confirm the response — all in under 60 seconds.
New engineers joining a project need to understand the API before touching the codebase. Point them at the spec and the tool: paste, browse, run. No environment setup required to make their first API request.
Technical writers and developer advocates need real examples. Generate curl commands for every endpoint directly from the authoritative spec — no manual curl-writing, no risk of stale examples.
The shell script download gives you all endpoints as a bash script. Modify the placeholder values, add assertions with jq, and you have a smoke test script that you can run after a deployment.
{petId} resolved to an example valueTry it now: openapi-to-curl.tools.jagodana.com
The client needed a robust developer tools solution that could scale with their growing user base while maintaining a seamless user experience across all devices.
We built a modern application using API and curl, focusing on performance, accessibility, and a delightful user experience.
Category
Developer Tools
Technologies
Date
May 2026
More work in Developer Tools