Postman to OpenAPI Converter
Convert Postman Collection v2.1 JSON to OpenAPI 3.0.0 specification.
Free online Postman to OpenAPI converter for software developers, API architects, and technical writers. Paste your Postman Collection v2.1 JSON and instantly generate a standardized OpenAPI 3.0.0 (Swagger) specification in JSON format. Automatically translates Postman folder hierarchies into organized OpenAPI tags, maps collection or request-level authentication schemes (Bearer JWT, Basic auth, API keys), converts URL path and query parameters, and synthesizes request and response body schemas. Download the resulting OpenAPI specification to render interactive API documentation with Swagger UI or Redoc.
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
Popular Developer Tools tools
- JWT DecoderDecode, inspect, and validate JWT tokens with claim and signature analysis.
- Cron ParserParse, validate, explain, and build cron expressions with next run times and visual timeline.
- Regex TesterTest, debug, and explain regular expressions with real-time match highlighting.
- Regex ExplainerBreak down any regex into plain English, token by token.
- JSON to TypeScript & Schema GeneratorGenerate TypeScript interfaces, Zod schemas, and Valibot schemas from JSON.
How to Postman to OpenAPI Converter Online
Paste your Postman Collection v2.1 JSON into the input panel, or load an example to see the expected format.
Optionally set an API Title and Version to override the values extracted from the collection name.
Enable "Folder Tags" to use Postman folder names as OpenAPI tags for organised endpoint grouping.
Toggle "Auth" to include detected security schemes (Bearer, Basic, API Key) in the OpenAPI spec.
Toggle "Examples" to embed saved Postman response examples in the generated OpenAPI responses.
Click "Convert" to generate the OpenAPI 3.0.0 JSON specification.
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
In-Depth Technical Guides
All GuidesAutomating API Contract Testing: Converting OpenAPI 3.1 to Postman Collections
Transform OpenAPI (Swagger) specifications into executable Postman Collections (v2.1). Automate contract testing, generate mock servers, and streamline API integration.
OpenAPI to TypeScript: Automated Type Generation, REST Contracts & Zod Guide
Generate end-to-end type safety from OpenAPI and Swagger specs. Learn how to convert OAS 3.0/3.1 JSON/YAML schemas into typed fetch clients, Zod validators, and path types.
Related Standards & RFC Specifications
All StandardsPre-built Automation Pipelines
Chain Postman to OpenAPI Converter with other utilities in a multi-step visual workflow.
Base64 Decode → JSON Format
Decode a Base64 string and pretty-print the JSON inside it.
CSV → JSON → YAML
Convert CSV data to JSON, then to YAML format.
JSON Format → TypeScript Schema
Format JSON and generate TypeScript/Zod schema from it.
Example Input & Output
Sample ReferenceInteractive Example: Postman to OpenAPI Converter in ActionShow example
Sample Input (text)
{
"info": {
"name": "Pet Store API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Pets",
"item": [
{
"name": "List all pets",
"request": {
"method": "GET",
"url": {
"raw": "https://petstore.example.com/v1/pets?limit=10",
"protocol": "https",
"host": [
"petstore",
"example",
"com"
],
"path": [
"v1",
"pets"
],
"query": [
{
"key": "limit",
"value": "10",
"description": "Max results to return"
}
]
}
},
"response": [
{
"name": "Success",
"code": 200,
"status": "OK",
"body": "[{\"id\":1,\"name\":\"Buddy\",\"tag\":\"dog\"}]"
}
]
},
{
"name": "Create a pet",
"request": {
"method": "POST",
"url": {
"raw": "https://petstore.example.com/v1/pets",
"protocol": "https",
"host": [
"petstore",
"example",
"com"
],
"path": [
"v1",
"pets"
]
},
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\"name\":\"Buddy\",\"tag\":\"dog\"}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "Get pet by ID",
"request": {
"method": "GET",
"url": {
"raw": "https://petstore.example.com/v1/pets/:petId",
"protocol": "https",
"host": [
"petstore",
"example",
"com"
],
"path": [
"v1",
"pets",
":petId"
],
"variable": [
{
"key": "petId",
"value": "1"
}
]
}
}
},
{
"name": "Delete a pet",
"request": {
"method": "DELETE",
"url": {
"raw": "https://petstore.example.com/v1/pets/:petId",
"protocol": "https",
"host": [
"petstore",
"example",
"com"
],
"path": [
"v1",
"pets",
":petId"
],
"variable": [
{
"key": "petId",
"value": "1"
}
]
},
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{bearerToken}}"
}
]
}
}
}
]
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{bearerToken}}"
}
]
}
}Sample Output
[Processed output for Postman to OpenAPI Converter]
Input transformed successfully using postman to openapi, postman to swagger, postman collection to openapi.What happened:
Convert Postman Collection v2.1 JSON to OpenAPI 3.0.0 specification.
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 TypeScript ConverterConvert OpenAPI/Swagger specs (JSON or YAML) to TypeScript interfaces, types, or Zod schemas.
- 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 idiomatic code across 14 programming languages instantly.