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
How to convert OpenAPI to Markdown
Paste the spec or open the file.
-
Paste or open your spec
Paste the YAML or JSON, or click Open a file and choose openapi.yaml, swagger.json or similar.
-
Choose what to include
Leave out Schemas for a shorter document, or Examples if they’re long.
-
Copy or download
Click Copy Markdown or Download .md and put it in your README or docs.
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.
What goes into the Markdown
Sections in the order they appear.
| Section | From the spec |
|---|---|
| Title, version and description | info. The spec version, such as OpenAPI 3.1.0 or Swagger 2.0, is noted too. |
| Servers | servers, or host, basePath and schemes in Swagger 2.0 |
| Authentication | securitySchemes (securityDefinitions in Swagger 2.0): API keys, HTTP bearer or basic, OAuth 2 and OpenID Connect |
| Endpoints | Every path and method, grouped by their first tag, as ### GET /bookings |
| Parameters table | Name, where it goes (path, query, header, cookie), type, whether it’s required, and the description with enum values, default and limits |
| Request body | Each content type and its schema |
| Responses table | Status code, description and the body’s type |
| Schemas | A 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
- OpenAPI Specification v3.2.0, OpenAPI Initiative
- Upgrading from OpenAPI 3.1 to 3.2, OpenAPI Initiative
More markdown converters tools
- Convert JSON to Markdown Table Converter Turn a JSON list of objects into a Markdown table. Open tool
- Convert Markdown to HTML Converter Turn Markdown into clean HTML, or a complete styled page. Open tool
- Convert HTML to Markdown Converter Turn HTML code or copied web pages into clean Markdown. Open tool
- Convert CSV to Markdown Table Converter Turn CSV into a lined-up Markdown table, with quoted values handled. Open tool