OpenAPI to Markdown Converter

This OpenAPI to Markdown converter turns an OpenAPI or Swagger file, in YAML or JSON, into readable API documentation in Markdown. Each endpoint gets its parameters, request body and responses in tables, followed by the schemas, ready for a README, a wiki or a docs site.

  • OpenAPI 3 and Swagger 2
  • YAML or JSON
OpenAPI or Swagger file

Options
Schemas
Examples

How to convert OpenAPI to Markdown

Paste the spec or open the file.

  1. Paste or open your spec

    Paste the YAML or JSON, or click Open a file and choose openapi.yaml, swagger.json or similar.

  2. Choose what to include

    Leave out Schemas for a shorter document, or Examples if they’re long.

  3. Copy or download

    Click Copy Markdown or Download .md and put it in your README or docs.

Example

This Bookings API in YAML becomes Markdown with 3 endpoints under a Bookings heading and 2 schemas, in 8 tables. The Booking schema is built with allOf from NewBooking, so its table lists all 5 properties, and every $ref is a link to the schema’s section.

Convert a sample OpenAPI file

What goes into the Markdown

Sections in the order they appear.

SectionFrom the spec
Title, version and descriptioninfo. The spec version, such as OpenAPI 3.1.0 or Swagger 2.0, is noted too.
Serversservers, or host, basePath and schemes in Swagger 2.0
AuthenticationsecuritySchemes (securityDefinitions in Swagger 2.0): API keys, HTTP bearer or basic, OAuth 2 and OpenID Connect
EndpointsEvery path and method, grouped by their first tag, as ### GET /bookings
Parameters tableName, where it goes (path, query, header, cookie), type, whether it’s required, and the description with enum values, default and limits
Request bodyEach content type and its schema
Responses tableStatus code, description and the body’s type
SchemasA table of properties per schema, with allOf merged, and oneOf, anyOf and maps written out

OpenAPI, Swagger and versions

OpenAPI is the standard way to describe a REST API in a file. It started as the Swagger Specification, and Swagger 2.0 is the same thing as OpenAPI 2.0. The current line is OpenAPI 3: version 3.2.0 came out in September 2025, and files written for 3.0 and 3.1 convert the same way.

An OpenAPI file can be written in JSON or YAML. The converter reads both, and the differences between 2.0 and 3.x, such as definitions versus components/schemas and body parameters versus requestBody.

The Markdown is a starting point you can edit and keep next to your code. For interactive docs with a Try it button, tools such as Swagger UI read the same file.

OpenAPI to Markdown Converter FAQ

How do I convert an OpenAPI spec to Markdown?

Paste the YAML or JSON into the box, or open the file. The Markdown documentation appears straight away, ready to copy or download.

Does it work with Swagger 2.0?

Yes. Swagger 2.0 files, with definitions, body parameters and securityDefinitions, convert the same way as OpenAPI 3.

Can it read YAML?

Yes, YAML and JSON. YAML anchors, multi-line text and comments are understood.

What happens to $ref?

A reference to a schema becomes a link to that schema’s section, like Booking. References to parameters and responses are filled in where they’re used.

Are external files followed?

No. A $ref to another file or a web address is shown as written, because the converter only reads the file you give it.

Is my text uploaded?

No. The conversion runs in your browser, on this page, so nothing you paste is sent to a server or saved. Closing the page clears it.

Sources and references

  1. OpenAPI Specification v3.2.0, OpenAPI Initiative
  2. Upgrading from OpenAPI 3.1 to 3.2, OpenAPI Initiative