DevFlow logoDevFlow
ToolsPipelinesExploreDocsPricing
⌘F
DashboardPipeline BuilderAnalytics

Try Pro — Free 7 days

No credit card required

Postman to OpenAPI Converter Online — Free Postman Collection to Swagger

How to Postman to OpenAPI Converter Online

  1. 1

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

  2. 2

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

  3. 3

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

  4. 4

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

  5. 5

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

  6. 6

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

  7. 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.

Related Developer Tools

  • OpenAPI to Postman Collection ConverterConvert OpenAPI/Swagger specs to Postman Collection v2.1 JSON.
  • OpenAPI ValidatorValidate, format, and summarize OpenAPI/Swagger specifications.
  • API Request BuilderBuild and test HTTP API requests with headers, body, auth, and response visualization.
  • cURL to Code ConverterConvert cURL commands to code in 12+ programming languages instantly.