Postman to OpenAPI Converter — Free Postman to Swagger

Postman to OpenAPI Converter

Convert Postman Collection v2.1 JSON to OpenAPI 3.0.0 specification.

Free online Postman to OpenAPI converter. Paste your Postman Collection v2.1 JSON and instantly generate an OpenAPI 3.0.0 specification with paths, operations, parameters, request bodies, and security schemes. Organizes endpoints by folder tags, auto-detects Bearer, Basic, and API Key auth, converts query/path parameters, and includes saved response examples. Download the OpenAPI JSON and use it with Swagger UI, Redoc, or any API documentation tool.

Keywords: postman to openapi, postman to swagger, postman collection to openapi, postman collection to swagger, convert postman to openapi, openapi generator from postman, postman openapi converter online, postman swagger export, api spec generator, postman to openapi 3, postman collection to openapi 3, openapi from postman collection

Tags: postman, openapi, swagger, api, collection, converter

Browse all 35 Developer Tools tools →

How to Postman to OpenAPI Converter Online

  1. Paste your Postman Collection v2.1 JSON into the input panel, or load an example to see the expected format.

  2. Optionally set an API Title and Version to override the values extracted from the collection name.

  3. Enable "Folder Tags" to use Postman folder names as OpenAPI tags for organised endpoint grouping.

  4. Toggle "Auth" to include detected security schemes (Bearer, Basic, API Key) in the OpenAPI spec.

  5. Toggle "Examples" to embed saved Postman response examples in the generated OpenAPI responses.

  6. Click "Convert" to generate the OpenAPI 3.0.0 JSON specification.

  7. Download the .openapi.json file or copy the output to use with Swagger UI, Redoc, or any OpenAPI-compatible tool.

Postman to OpenAPI Converter Features

  • Converts Postman Collection v2.1 JSON to OpenAPI 3.0.0 specification format

  • Recursively traverses nested Postman folders, preserving folder names as OpenAPI tags

  • Handles both string URL and structured PostmanUrl object formats for accurate path extraction

  • Converts Postman path variables (:param) and template variables ({{var}}) to OpenAPI {param} syntax

  • Extracts query parameters, header parameters, and path parameters from each request

  • Maps Postman request bodies to OpenAPI requestBody: raw JSON, form-data, urlencoded, and GraphQL

  • Detects Bearer, Basic Auth, API Key, and OAuth2 auth at collection level and request level

  • Merges multiple HTTP methods on the same path into a single OpenAPI path object

  • Embeds saved Postman response examples as OpenAPI response schemas with status codes

  • Auto-detects the server base URL from the first request or accepts a manual override

  • Generates downloadable OpenAPI JSON ready for import into Swagger UI, Redoc, or Stoplight

  • No file upload required — paste JSON directly and convert instantly in the browser

Frequently Asked Questions

What Postman collection version is supported?
The converter supports Postman Collection v2.1 format (schema URL containing "v2.1.0"). This is the current standard format exported by Postman. v2.0 collections are not supported — you can upgrade them in Postman by exporting again and selecting "Collection v2.1".
How do I export a collection from Postman?
In Postman, right-click your collection in the sidebar and choose "Export". Select "Collection v2.1" as the format and save the JSON file. Open the downloaded file in a text editor, copy its contents, and paste it into the converter input.
How are Postman folders converted to OpenAPI tags?
When "Folder Tags" is enabled, each top-level Postman folder name becomes an OpenAPI tag. Requests inside that folder are tagged accordingly, which causes tools like Swagger UI to group them under collapsible sections. Requests not inside any folder have no tags assigned.
Which authentication types are detected?
The converter maps Postman auth types to OpenAPI security schemes: "bearer" becomes HTTP Bearer auth, "basic" becomes HTTP Basic auth, "apikey" becomes API Key auth (header or query position is preserved), and "oauth2" becomes an OAuth2 placeholder. Auth can be set at the collection level or per request.
What happens to Postman variables like {{baseUrl}}?
Postman environment variables in the URL (e.g., {{baseUrl}}/users) are stripped when extracting the server base URL. The path portion (/users) is preserved. If the converter cannot determine a clean server URL, you can provide one manually via the "Base URL" field on the API route or by setting it in your Postman collection variables.
How are request bodies converted?
Postman body modes map to OpenAPI content types: "raw" with JSON language becomes application/json, "formdata" becomes multipart/form-data, "urlencoded" becomes application/x-www-form-urlencoded, and "graphql" becomes application/json with a query/variables schema. When "Examples" is enabled, the raw body content is embedded as the OpenAPI example value.
Does the tool convert saved Postman responses?
Yes. When "Examples" is enabled, saved responses in each Postman request are converted to OpenAPI response objects. The HTTP status code, response body, and content type are extracted. If no saved responses exist, a generic "200: Successful response" placeholder is generated.
Is my Postman collection data safe?
Your collection JSON is sent to our server for conversion and is not stored or logged. Avoid including production secrets or access tokens in your collection before converting. Store sensitive values in Postman environment variables rather than hardcoding them in requests.