Skip to content

Convert Swagger and Postman to OpenAPI

Turn a Swagger 2.0 file, a Postman collection, RAML, an Insomnia export, a HAR capture or a cURL command into OpenAPI 3.0, 3.1 or 3.2, or take OpenAPI 3 back to Swagger 2.0, as JSON or YAML. Every change the conversion makes is listed, and anything it cannot carry across waits for your decision before you download. Free, and it runs in your browser.

API source to convert
Advanced configuration

Variables, HTTP mappings, credential choices and duplicate choices, as JSON. Target and format come from the fields above. Configuration reference

Converting a folder, a batch, or a protocol that needs HTTP mappings? Open the full converter

Pasted and uploaded files never leave this tab. A Rust engine compiled to WebAssembly does the work in your browser. A URL is fetched once through our proxy, and nothing is kept.

An example run: a Swagger 2.0 spec converted to OpenAPI 3.1.2, with each change listed and one that needs review.

How the OpenAPI converter shows its work

Every change lands in a record you can read, so the spec you download is one you can sign off.

Reads the source

The format is detected from the content. Upload the files a source refers to with it, and give values for any variables in its URLs.

Targets one exact release

Choose Swagger 2.0 or any published OpenAPI 3.0, 3.1 or 3.2 release. The output is validated against that release before you see it.

Lists every change

Each decision is marked preserved, transformed, inferred, omitted or blocked, with a pointer to where it came from in the source.

Exports with a record

Download the spec as JSON or YAML, plus a report holding the source and every decision. Anything unresolved is labelled a draft.

Postman, RAML and WSDL to OpenAPI, source by source

Direct sources convert as they are. Mapped sources describe operations that are not HTTP endpoints, so each one needs a method and path from you.

SourceKindWhat becomes OpenAPIWhat you may need to give it
Swagger 2.0swagger: "2.0"Directdefinitions move to components, host, basePath and schemes become servers, and body and form parameters become a requestBody.Usually nothing. A collectionFormat with no OpenAPI 3 style, such as tsv, waits for your review.
OpenAPI 3.xopenapi: 3.0 to 3.2DirectMoves to the release you choose, up or down, back to Swagger 2.0 included, so 3.1 to 3.0 is as available as 3.0 to 3.1.A decision on anything the target release cannot express, such as a QUERY operation going below 3.2.
Postman collectioncollection v2.1DirectRequests become operations, and schemas are inferred from the bodies of saved examples, marked as inferred so you can check them.Values for collection variables used in URLs, such as {{baseUrl}}.
RAML#%RAMLDirectResources, methods and types become paths, operations and schemas.The files the RAML includes, uploaded with the root file.
Insomnia, HAR, cURLexport, capture, commandDirectEach recorded request becomes an operation, with schemas inferred from the bodies it carried.A server base for captured traffic, and values for environment variables.
AsyncAPI, GraphQL, gRPC, WSDLprotocol descriptionsMappedOperations and messages carry across once each has an HTTP method and path. The result is the contract for an HTTP API, ready for whoever builds it.An HTTP mapping for each operation, in the advanced configuration or the full converter.

After the conversion, two more checks

Three free tools, three different questions about one spec. A converted spec is worth checking with the other two.

Is it the version I need?

The converter, on this page. It moves a source to the OpenAPI release you pick and keeps a record of everything it changed.

This page

Is it valid OpenAPI?

The OpenAPI Parser validates the result against its release, points at the line of every error, and bundles or dereferences it.

Validate a spec

Will it make a good SDK?

Spec Audit scores the converted spec out of 10 on fourteen rules, each one tied to something that breaks in generated code.

Audit a spec

An open-source OpenAPI converter for ten languages

This page runs the published WebAssembly package. The Rust core, a command line tool and bindings for nine more languages live in the same Apache-2.0 repository.

Browser and bundlers

npm install @octri/spec-converter-wasm

Also a native Node.js package, the Rust crate, and bindings for eight more languages that bundle the native library for Linux x64 and arm64 and macOS arm64.

OpenAPI converter questions

Yes. Pick a 3.0 release as the target. Most 3.1 schemas have a 3.0 form and are rewritten into it. Anything that does not survive the trip is listed for your decision before you download, so nothing is dropped without you seeing it.