7 releases (stable)

1.2.1 Jan 31, 2024
1.2.0 Nov 30, 2023
1.1.0 Sep 13, 2023
1.0.0 Aug 1, 2022
0.1.0 Aug 21, 2020

#596 in Web programming

Download history 323/week @ 2024-01-23 327/week @ 2024-01-30 295/week @ 2024-02-06 466/week @ 2024-02-13 476/week @ 2024-02-20 449/week @ 2024-02-27 382/week @ 2024-03-05 425/week @ 2024-03-12 432/week @ 2024-03-19 168/week @ 2024-03-26 201/week @ 2024-04-02 151/week @ 2024-04-09 157/week @ 2024-04-16 198/week @ 2024-04-23 138/week @ 2024-04-30 113/week @ 2024-05-07

640 downloads per month
Used in postman2openapi-cli




Convert Postman collections to OpenAPI definitions.

Build status

Try it on the Web: https://kevinswiber.github.io/postman2openapi/



Archives of precompiled binaries for postman2openapi are available for Windows, macOS and Linux.

Linux binaries are static executables. Windows binaries are available either as built with MinGW (GNU) or with Microsoft Visual C++ (MSVC). When possible, prefer MSVC over GNU, but you'll need to have the Microsoft VC++ 2015 redistributable installed.

For Rust developers, installation is also available via Cargo. Installing Rust and Cargo

To install the latest published version on crates.io, use:

cargo install postman2openapi-cli

To install from the latest on GitHub, use:

cargo install --git https://github.com/kevinswiber/postman2openapi postman2openapi-cli


    postman2openapi [OPTIONS] [input-file]

    <input-file>    The Postman collection to convert; data may also come from stdin

    -f, --output-format <format>    The output format [default: yaml] [possible values: yaml, json]
    -h, --help                      Print help information
    -V, --version                   Print version information


postman2openapi collection.json > openapi.yaml
cat collection.json | postman2openapi -f json

JavaScript library


npm install postman2openapi


const collection = require("./collection"); // any Postman collection JSON file
const { transpile } = require("postman2openapi");

// Returns a JavaScript object representation of the OpenAPI definition.
const openapi = transpile(collection);

console.log(JSON.stringify(openapi, null, 2));

JavaScript API

transpile(collection: object): object

  • collection - An object representing the Postman collection.
  • returns - an OpenAPI definition as a JavaScript object.


Note: A Dev Container is included for convenience.

To take advantage of build recipes, install just.

just build

Builds the Rust library and the CLI packages.

just test

Runs all lint checks (cargo fmt --check, cargo clippy) and runs all tests, including tests for wasm32-unknown-unknown targets (Node.js, Chrome, Firefox).

just start-web

Builds the WebAssembly project and starts a local version of the postman2openapi site.

just prepare

Builds the Rust library, the CLI, the Node.js library, and the Web site. Then all tests are run.


Apache License 2.0 (Apache-2.0)


~148K SLoC