Paste, upload or load an OpenAPI (Swagger) specification to browse it as clean, searchable API documentation, open it in Swagger UI, and see validation errors with their exact location. Works with OpenAPI 2.0, 3.0 and 3.1 in JSON or YAML, entirely in your browser.
Last updated:
Swagger UI is loaded from a public CDN the first time you open this tab. "Try it out" sends requests from your browser straight to the API servers in the spec.
Advertisement
Advertisement
How to use the OpenAPI / Swagger Viewer
Add your spec: paste JSON or YAML into the editor, open an openapi.yaml / swagger.json file, drop it on the box, or load a public URL.
Click View docs (or just keep typing: the view updates automatically).
Browse endpoints: search by path or summary, filter by HTTP method and click an operation to see its parameters, request body, responses and example payloads.
Fix problems: the Problems tab lists errors and warnings with the JSON path where they occur.
Open Swagger UI for the classic interactive view, or download the spec converted to JSON or YAML.
OpenAPI document structure
Section
OpenAPI 3.x
Swagger 2.0
Version field
openapi: 3.0.3 or 3.1.0
swagger: "2.0"
API details
info (title and version required)
info
Base URL
servers[].url
schemes + host + basePath
Endpoints
paths (optional in 3.1 with webhooks)
paths
Request body
requestBody.content per media type
a parameter with in: body
Reusable schemas
components.schemas
definitions
Authentication
components.securitySchemes
securityDefinitions
Response schema
responses.200.content['application/json'].schema
responses.200.schema
Most common validation errors
Path parameter not defined: every {id} in a path needs a matching parameter with in: path and required: true, either on the operation or on the path item.
Broken $ref: a typo in #/components/schemas/Name, or a schema that was renamed. References are case-sensitive.
Response without description:description is required on every response object in 2.0 and 3.x, even if it is an empty string.
Unquoted version or status codes in YAML: write "200" and version: "1.0" in quotes so YAML does not turn them into numbers.
Duplicate operationId: code generators use it for method names, so each must be unique.
Arrays without items:type: array needs an items schema.
OpenAPI 3.0 vs 3.1
OpenAPI 3.1 aligns schemas with JSON Schema 2020-12: type may be an array such as [string, "null"] instead of nullable: true, examples is an array, exclusiveMinimum is a number, and a document may contain only webhooks or components without paths. This viewer accepts both styles and applies the matching rules for the version declared in the document.
Frequently asked questions
What is the difference between Swagger and OpenAPI?
Swagger 2.0 was renamed the OpenAPI Specification when it moved to the OpenAPI Initiative in 2016. OpenAPI 3.0 (2017) and 3.1 (2021) are the newer versions. Swagger now refers to the SmartBear tools, such as Swagger UI and Swagger Editor, that work with OpenAPI files.
Which versions does this viewer support?
It reads Swagger/OpenAPI 2.0 documents (swagger: "2.0") and OpenAPI 3.0.x and 3.1.x documents (openapi: "3.x.x"), written in JSON or YAML.
What does the validator check?
Required fields such as info.title, info.version, paths and responses; path keys and path parameters; parameter locations; duplicate operationIds; broken local $ref pointers; unknown security schemes; invalid schema types and arrays without items. It is a practical structural check, not a full JSON Schema validation of the specification.
Is my API specification uploaded?
No. The spec is parsed and rendered in your browser. Only the optional Swagger UI view downloads the Swagger UI library from a public CDN, and the URL loader fetches the address you enter. Nothing is sent to FreeToolCabin.
Why does loading from a URL fail?
The browser can only read a spec from another site if that server allows cross-origin requests (CORS). If loading fails, open the URL in a new tab, save the file and open it here, or paste its contents.
Are external $ref files supported?
References inside the same document (starting with #/) are resolved. References to other files or URLs are listed as warnings and not followed, because the viewer only has the single document you provide.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.