What is Swagger?

Swagger is a way to describe a REST API in one JSON or YAML file: every endpoint, the parameters it takes, the data you send and what comes back. Swagger 2.0 is the version many older APIs still ship, and its newer form is called OpenAPI. Lots of web frameworks write this file for you, so it's often the quickest way to learn how an API works.

Tool description

This tool turns a Swagger file into API docs you can read. Paste the JSON or YAML, or open the file, and the endpoints show up grouped by tag with their method, path and summary. Click one to see its parameters, request body and responses, each with a schema and an example. The tool also checks the file against the Swagger rules and lists what's wrong. OpenAPI 3.0 and 3.1 files work too.

Features

  • Readable docs for Swagger 2.0 and OpenAPI 3 files in JSON or YAML
  • A validity check that lists each problem and where it is
  • Endpoints grouped by tag, with a filter to find one fast
  • Parameters, request bodies and responses with schemas and examples
  • Every schema in one list, nested parts opening as you need them

How it works

Everything runs in your browser, and the file never leaves your device. The text is read as JSON or YAML, then Swagger Parser checks it against the official schema of its version, plus rules like unique operation IDs. References inside the file, like #/definitions/Pet, are followed when you open them. A schema that refers to itself is marked where it repeats instead of going on forever. References to other files or web addresses aren't loaded, so those parts show by name only.

Examples come from the file's own examples and default values first. Where it has none, the tool fills in a value that fits the type, like a date for a date field.

Tips

  • The docs still show when the check finds problems, so you can read and fix the file side by side.
  • Type part of a path, a tag or a method into the filter to find an endpoint in a big API.
  • Many APIs publish their file at an address like /swagger.json. Open it in your browser and paste the text here.
  • Read only fields are left out of request examples, and write only fields out of response examples, just like a real client would send and get them.