OpenAPI to Postman Converter

Paste an OpenAPI 3 spec — JSON or YAML — and get an importable Postman v2.1 collection, with a folder per tag and example bodies.

In-browser & private
Advertisement

Imported as the {{baseUrl}} collection variable, so you can point the whole collection at another environment from one field.

OpenAPI spec (JSON or YAML) Ctrl + Enter to convert
Postman collection v2.1
Paste a spec on the left, or press Sample.
Folders — Requests — Size 0 B

What you get in Postman

  • A {{baseUrl}} variable, not a hard-coded host. That is the difference between a collection you can point at staging and one you have to edit forty times. If the spec's server is a bare path — and many are, the Swagger Petstore's is /api/v3 — it is joined onto a placeholder host you can replace in one place.
  • A folder per tag, matching how the API is documented.
  • Path parameters become Postman variables. /pet/{petId} is imported as /pet/:petId, so Postman shows it as an editable field rather than literal text.
  • Example request bodies. Built from the request schema, using the spec's own example or default where it gives one, so a request is runnable rather than an empty shell.
  • Optional query parameters are added but disabled — visible in the UI as unticked, so you can see what is available without sending empty values.
  • The body is sent the way the spec declares it. JSON as raw JSON, a form as url-encoded fields, multipart/form-data as form data with a file picker for binary properties, and a raw byte body as Postman's file mode — rather than everything as JSON.
  • Security becomes Postman auth. A bearer, basic, API-key or OAuth 2 scheme is set on the collection, with the credential as a variable you fill in once. An operation that overrides the document's security carries its own.

Frequently asked questions

Is my spec uploaded anywhere?
No. The spec is parsed and the collection built in your browser, so an internal API description never leaves the page.
How do I get this into Postman?
Download the file, then in Postman choose Import and select it. It is a Collection v2.1 document, which every current version reads. Copying the JSON and pasting it into Import's raw text box works too.
Where do I set the host and the credentials?
In the collection's variables. The host is {{baseUrl}}, seeded from the spec's first server, and a security scheme adds a variable for its credential — {{bearerToken}}, {{apiKey}} or a username and password. Edit them once and every request follows.
Why is my server a placeholder host?
Because the spec gave a bare path. Many do: the Swagger Petstore's server is just /api/v3, since the host depends on where it is deployed. A relative server is joined onto https://api.example.com so the collection runs after one edit rather than failing silently.
Are the example bodies real data?
They are built from each request's schema, preferring the spec's own example or default where it gives one, and otherwise using a placeholder of the right type. They are meant to be edited, not sent as they are.

More free tools