OpenAPI Viewer
Parse an OpenAPI 3.x or Swagger 2.0 document in JSON or YAML and render its structure in the browser.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Parsed OpenAPI 3.1.0 "Items API" with 2 path(s) and 3 operation(s).
How it works
- Detected JSON input and parsed the document.
- Read the OpenAPI version 3.1.0 and the info block.
- Counted 1 server(s), 2 path(s), 3 operation(s), 0 tag(s) and 0 component schema(s).
- Listed every operation.
- No structural problems were found in the parts this viewer reads.
- The viewer does not resolve external $ref targets or fetch a remote document.
Methodology
- Detect JSON by a leading brace or bracket; otherwise parse the text as YAML with the JSON↔YAML engine.
- Require an `openapi` (3.x) or `swagger` (2.0) version field; otherwise reject as unrecognised.
- Read `info.title` and `info.version` and record a note when either is missing.
- Count servers (or the Swagger host), paths, operations, tags and component/definition schemas.
- List the operations as METHOD + path and filter them by the optional path fragment.
Usage
- Paste an OpenAPI 3.x or Swagger 2.0 document as JSON or YAML.
- Optionally type a path fragment to filter the operation list.
- Read the version, info, counts, operation list and any structural notes.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
OpenAPI 3.1 JSON document
{
"text": "{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Items API\",\"version\":\"1.2.0\"},\"servers\":[{\"url\":\"https://api.example.com\"}],\"paths\":{\"/items\":{\"get\":{\"responses\":{\"200\":{\"description\":\"ok\"}}},\"post\":{\"responses\":{\"201\":{\"description\":\"created\"}}}},\"/items/{id}\":{\"get\":{\"responses\":{\"200\":{\"description\":\"ok\"}}}}}}",
"path": ""
}Swagger 2.0 YAML document
{
"text": "swagger: \"2.0\"\ninfo:\n title: Legacy API\n version: \"1.0\"\nhost: api.example.com\npaths:\n /ping:\n get:\n responses:\n \"200\":\n description: ok\n",
"path": "/ping"
}Limitations
What a viewer should and should not do
An OpenAPI document describes an API, so it is often as sensitive as the API itself. A viewer that uploads the document to a service leaks internal host names and schema shapes. This viewer parses the text locally and shows the structure; it deliberately refuses to fetch a URL or follow an external reference, because that would turn a viewing action into a network request.
Structure, not full validation
Full OpenAPI validation is a large specification concern and usually needs a schema dialect and reference resolution. This tool answers a narrower, honest question: can the document be read as OpenAPI, and what does it contain? It reports missing version or info fields and leaves deep schema validation to a dedicated tool.
Frequently asked questions
- Is my API document uploaded?
- No. The document is parsed entirely in your browser. It is never sent, stored or logged, which matters because an API description often names internal hosts.
- Does it validate my schema?
- It performs structural checks (version, info, paths) and reports problems with the parts it reads. It is not a full JSON Schema or OpenAPI validator, and it does not resolve remote references.
- Which versions are supported?
- OpenAPI 3.x (via the openapi field) and Swagger 2.0 (via the swagger field). The version string is reported as written.
Sources
- OpenAPI Specification 3.1.0 — OpenAPI Initiative
- OpenAPI Specification 2.0 (Swagger) — OpenAPI Initiative
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.