A web-based tool that converts Postman Collections (v2.x) to OpenAPI 3.0 Specifications. Built with Next.js, TypeScript, and Tailwind CSS.
- 🔄 Convert Postman Collections to OpenAPI 3.0 Specifications
- 📝 Support for both YAML and JSON output formats
- 📋 One-click copy functionality
- 🎨 Clean and responsive UI
- ⚡ Real-time conversion
- 🛠️ Handles complex Postman collection structures
- 🔍 Detailed error reporting
- 💼 Preserves request metadata (descriptions, examples, etc.)
- ✅ Basic request details (URL, method, description)
- ✅ Query parameters
- ✅ Path parameters
- ✅ Headers
- ✅ Request bodies (raw JSON and form-data)
- ✅ Collection folder structure (converted to tags)
- ✅ Authentication schemes (Basic and Digest)
Wanna try it out? Follow the steps below:
- Node.js 18.x or later
- npm or yarn
-
Clone the repository:
git clone https://github.com/Technical-writing-mentorship-program/PostmanToOpenAPIConverter.git cd postman-openapi-converter
-
Install dependencies:
npm install # or yarn install
-
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 in your browser.
-
Build the application:
npm run build # or yarn build
-
Start the production server:
npm start # or yarn start
-
Prepare Your Postman Collection
- Export your Postman Collection (Collection v2.x format)
- Copy the JSON content
-
Convert the Collection
- Paste the Postman Collection JSON into the left textarea
- Click the "Convert" button
- Select your preferred output format (YAML or JSON)
-
Use the Result
- Copy the converted OpenAPI specification using the copy button
- Use the specification in your OpenAPI tools
To run a test, use the sample postman collection in the EXAMPLE folder afterwhich you can confirm that the response corresponds with the EXAMPLE OpenAPI Spec.
- Framework: Next.js 14
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Icons: Lucide React
PostmanToOpenAPIConverter.tsx
: Main component containing the converter logicparseUrl()
: Handles URL parsing from Postman formatprocessParameters()
: Processes query parameters, path parameters, and headersprocessRequestBody()
: Handles request body conversiontoYAML()
: Converts JavaScript objects to YAML formatconvertToOpenAPI()
: Main conversion logic for Postman to OpenAPI
- Parses the input Postman Collection JSON
- Extracts collection metadata (name, description)
- Processes each request in the collection:
- Converts URL and path parameters
- Processes request headers
- Handles request bodies
- Maps collection folders to OpenAPI tags
- Generates the OpenAPI specification
- Outputs in either YAML or JSON format
Contributions are welcome! For more information on how to contribute, see our CONTRIBUTING.md file.
- Only supports Postman Collection Format v2.x
- Limited support for complex authentication schemes
- Does not handle environment variables
- No support for response examples
- Limited support for non-JSON request bodies
- Support for Postman Collection Format v2.1
- Handle Postman environment variables
- Implement more authentication schemes
- Add batch conversion support
- Add file upload/download functionality
- Implement OpenAPI to Postman conversion
- Add validation for OpenAPI output
This project is licensed under the MIT License - see the LICENSE file for details.
- Postman for their amazing API development ecosystem
- OpenAPI Initiative for the OpenAPI Specification
- shadcn/ui for the beautiful UI components
For any questions or suggestions, please open an issue or contact the maintainers.
Made with ❤️ by Wisdom Nwokocha & Prince Onyeanuna