Skip to content

OpenAPI / Swagger Preview

Render OpenAPI 3.x and Swagger 2.0 specs in JSON or YAML as API docs with endpoints grouped by tag, parameters and schemas.

OpenAPI / Swagger Preview

13,084 chars

Pet Store API

v1.2.0OpenAPI 3.0.3

A sample pet store API demonstrating OpenAPI 3.0 features. Manage your pets, orders, and user accounts.

Contact: API SupportEmail: support@petstore.example.comLicense: Apache 2.0
12 endpoints4 schemas3 tags
Servers
Security schemes
bearerAuthhttp
Scheme: bearer (JWT)

JWT authentication token

apiKeyapiKey
In: header / Name: X-API-Key

API key for service-to-service auth

12 endpoints
pets5 endpoints

Everything about your pets

orders4 endpoints

Access to pet store orders

users3 endpoints

User account operations

Schemas4 definitions

Supported features

Spec versions

OpenAPI 3.0.x / 3.1.x and Swagger 2.0. Auto-detects JSON or YAML format.

Endpoints

GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, TRACE. Grouped by tag with parameters, request bodies, and responses.

Schemas

Component/definition schemas with $ref resolution. Displays property types, required fields, and descriptions.

Security

HTTP Bearer, API Key, OAuth2, and OpenID Connect security scheme display.

Updated . Provided as is. Check the output before you rely on it in production.

How to use OpenAPI / Swagger Preview

  1. 1

    Paste an OpenAPI or Swagger spec

    Paste an OpenAPI 3.0/3.1 or Swagger 2.0 spec as JSON or YAML, or load the sample. The format is detected automatically.

  2. 2

    Navigate endpoints

    Endpoints are grouped by tag. Expand any endpoint to see its parameters, request body and responses, or use Expand All and Collapse All.

  3. 3

    Search the spec

    Filter endpoints by path, method, summary or operationId to find what you need in a large spec.

  4. 4

    Review schemas and security

    Check response schemas for success and error cases, the component schemas, servers and the security schemes the API declares.

  5. 5

    Copy endpoint URLs

    Copy the full URL for any endpoint, including the server base, for curl, a REST client or your code.

Questions and answers

What is OpenAPI / Swagger Preview?
OpenAPI, formerly Swagger, is a JSON or YAML format describing a REST API's endpoints, parameters, request bodies and responses. This previewer parses OpenAPI 3.x and Swagger 2.0 specs and renders endpoints grouped by tag, with parameters, schemas resolved from $ref, servers and security schemes.
Does it support both OpenAPI 3.x and Swagger 2.0?
Yes. The tool supports both OpenAPI 3.0/3.1 and legacy Swagger 2.0 specifications. It accepts both JSON and YAML formats and renders the documentation the same way regardless of the spec version.
For AI agents: how to call this tool

Machine-readable contract, endpoints and examples. Humans can ignore this section.

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/openapi-preview/

For automation planning, fetch the canonical contract at /api/tool/openapi-preview.json.