OpenAPI and Swagger viewer online

Paste a spec or choose a file and every endpoint appears grouped by tag, with parameters, request bodies, responses and a copyable curl command. It reads OpenAPI 3.0, 3.1 and Swagger 2.0 in JSON or YAML, and the file never leaves your device.

Everything runs in your browser. Your text and files stay on your device and are never uploaded.

You can also drop a .json or .yaml file on the box. It is read on this device and never uploaded.

How to use it

  1. Paste your spec into the box, choose a .json or .yaml file, or press Load example.
  2. Check the summary line for the spec version, endpoint count and auth schemes.
  3. Search by path, summary, operationId or tag, or narrow the list with the method and tag filters.
  4. Open an endpoint to read its parameters, request body, responses and example response.
  5. Pick a server and copy the curl command to try the call in a terminal.

What the viewer reads

It accepts OpenAPI 3.0 and 3.1 and Swagger 2.0, as JSON or YAML. Endpoints are grouped by tag. Each one shows its parameters, request body, responses, security and an example built from the schemas, plus a curl command you can copy.

Spec partWhere it shows up
infoTitle, version and description at the top
servers (or host and basePath)The base URL picker for curl examples
tagsGroups and the tag filter
pathsOne row per method and path
components/schemas (or definitions)Type names and generated example bodies
securitySchemesAuth summary and the header in curl

References that point to other files are not fetched, since nothing leaves your browser. Bundle the spec into one file first if it uses them.

Questions

What is the difference between OpenAPI and Swagger?

Swagger 2.0 is the older name and format. OpenAPI 3.x is its successor, with servers, components and requestBody. This viewer reads both, so an older Swagger file and a current OpenAPI file open the same way.

Does my API spec get uploaded anywhere?

No. The file is read and parsed in your browser tab, and nothing is sent to a server. That makes it safe for internal specs that should not go to a public online Swagger editor.

Why does it say my file is not an OpenAPI file?

The top level needs an openapi: or swagger: version field. Files without one, such as a JSON Schema or a Postman collection, are not OpenAPI files. JSON with a trailing comma also fails, and when YAML cannot be read the message names the line.

Does it resolve $ref references?

Yes for references inside the same file, such as #/components/schemas/Pet, including nested and recursive ones. References to other files or URLs are not fetched, because that would need a network call. Bundle the spec into one file first.

Can I try requests from this page?

No, it only reads the spec and builds a curl command from it. Set TOKEN or API_KEY in your shell before you run it, since the command reads the key from there, and fill in placeholders such as {petId} that the spec gives no example for.

How big a spec can it open?

Large public specs open fine: GitHub's REST API description, an 11 MB YAML file with about 1,300 endpoints, takes a few seconds. The list shows 100 endpoints at a time with a Show more button, so the page stays responsive after that.

More free tools

All free tools