Skip to content

OpenAPI and Swagger viewer and docs exporter

Inspect internal API endpoints, resolved models, security schemes, and generated curl examples in your browser, then export offline Markdown or PDF docs.

Offline documentation preview with zero live network calls.

Or drop an openapi.yaml or swagger.json file

Resolves $ref and allOf schemas inside a local Web Worker.

How to use OpenAPI & Swagger viewer

  1. Paste or drop an OpenAPI file. Load a YAML or JSON contract into the editor, drop a local openapi.yaml or swagger.json file onto the DropZone, or click Load sample OpenAPI spec to test the built-in Internal Ledger API 3.1.0 fixture.
  2. Render with the swagger json yaml parser. Click Render API reference so the local parser validates the root version field, indexes tags, builds endpoint cards, and resolves component schemas without making network requests.
  3. Inspect parameters and security schemes. Use the search box and tag filter pills to narrow operations, read merged request models, inspect Bearer or API key auth schemes, and copy static cURL examples.
  4. Export OpenAPI 3.1 endpoints to A4 PDF docs. Click Export Markdown (.md) to download plain documentation or click Export API docs (.pdf) to typeset a portrait A4 PDF in the local Web Worker.

Everything runs in this browser tab. Nothing you paste or open is uploaded or logged, so it's safe for keys, tokens and private data.

How does local OpenAPI parsing keep internal API specs private?

Client-side parsing loads your YAML or JSON contract straight into browser memory so unpublished microservice routes, staging hostnames, and authentication headers never cross the network. Validation, schema traversal, and documentation exports execute inside local scripts without remote validator APIs or telemetry payloads.

Hosted documentation portals frequently send pasted specs to cloud validation backends or fetch external schema links over HTTP. Unreleased fintech, healthcare, and partner contracts expose internal topology whenever those bytes hit external infrastructure. Using a private OpenAPI viewer without uploading YAML specs pairs naturally with tools like SQLite Viewer when teams audit local configuration databases and API contracts together.

Every specification conforms to the OpenAPI Initiative 3.1.0 Specification data model without triggering outbound calls:

  • Zero remote $ref fetching: External HTTP or relative file pointers remain literal placeholders rather than triggering background network requests.
  • Non-executable cURL snippets: Request builders format static terminal strings instead of running browser Try-it-out calls against staging servers.
  • Memory-only file handling: Dropped openapi.yaml or swagger.json files are read via the browser File API and discarded when you click Clear.

Spec formats, $ref resolution, and circular schemas

API teams frequently maintain contracts across mixed OpenAPI 3.0, 3.1, and legacy Swagger 2.0 repositories. When auditing breaking schema changes across branches, engineers often compare OpenAPI specification revisions line by line before loading the updated contract into the inspector.

JSON Pointer dereferencing and allOf composition

Local references starting with #/ follow the IETF RFC 6901 JSON Pointer specification for path traversal. Path keys frequently contain literal slashes such as /v1/payouts, so the resolver unescapes ~1 back to / before decoding ~0 back to ~.

Polymorphic models built with allOf merge every resolved sub-schema into a unified field list. The resolver combines nested properties maps and deduplicates required arrays so caller payloads display complete inheritance structures in one panel.

Depth caps and YAML vs JSON syntax support

Self-referential graphs such as recursive comment trees or linked ledger entries can trigger infinite loops in naive viewers. The dereferencer tracks visited pointers per branch and stops recursion once a reference repeats or crosses 8 levels deep.

Both strict JSON and multi-line YAML files pass through a spec-compliant YAML parser before tree extraction begins. Teams working with a Swagger YAML viewer can paste anchors, comments, or compact JSON objects into #openapi-input and inspect the parsed tree without pre-conversion.

Endpoint explorer, sample payloads, and cURL builder

Once parsed, the left index groups operations by OpenAPI tags and highlights HTTP verbs from GET through HEAD. Routes marked deprecated: true render an inline Deprecated badge next to the path so reviewers spot sunset endpoints immediately.

Capability OpenAPI 3.0 and 3.1 Swagger 2.0 Inspector behavior
Schema lookup root #/components/schemas #/definitions Resolves local JSON Pointers
Server base URL servers[0].url host plus basePath Prefixes generated cURL paths
Request payload source requestBody.content in: body parameters Renders formatted JSON samples
Security registry components.securitySchemes securityDefinitions Lists Bearer, API key, OAuth2
File upload formats YAML and JSON YAML and JSON Accepts .yaml, .yml, .json

Method badges, tag filters, and parameter tables

Typing into Search endpoints… filters across paths, summaries, operation IDs, and tags simultaneously. Selecting any tag pill narrows the scrollable list down to a single domain slice, such as the Payouts group in the built-in Internal Ledger API v2.1.0 sample.

Each selected route breaks down query, path, header, and cookie parameters inside a structured table. Required inputs display a red asterisk next to the parameter name alongside their resolved scalar type and schema description.

Deterministic JSON examples and offline cURL snippets

Schema sample synthesis prioritizes explicit example, default, enum, and oneOf values before falling back to deterministic placeholders by format. Timestamps emit ISO strings, email fields emit sample addresses, integer types emit 42, and number types emit 12.5.

Clicking Copy cURL copies a ready-to-run terminal command referencing the OpenAPI Initiative Swagger 2.0 Specification or 3.1 base URL and headers. Engineers comparing live traffic failures against documented request contracts can cross-check generated commands alongside HTTP archive network capture diagnostics during incident triage.

Security schemes and static Markdown or PDF export

Documentation consumers need clear authentication requirements and portable offline artifacts alongside interactive browsing. Specs written under the YAML 1.2.2 Core Specification often embed multi-environment security definitions and rich Markdown descriptions inside info.description.

Bearer, API key, OAuth2, and OpenID metadata inspection

The inspector reads securitySchemes in OpenAPI 3.x and securityDefinitions in Swagger 2.0 to render scheme names, transport types, and header locations. Reviewers can verify whether a route expects Authorization: Bearer tokens, custom API key headers, or OAuth2 scopes before writing integration code.

When generating example cURL requests, the builder checks operation-level security blocks before falling back to top-level document security defaults. Header placeholders use safe dummy tokens like Bearer <token> so screenshots and shared documentation never leak real credentials.

Generating offline Markdown and A4 PDF reference docs

Clicking Export Markdown (.md) serializes servers, authentication details, endpoint parameter tables, response codes, and cURL samples into a single .md download. For formal vendor reviews, clicking Export API docs (.pdf) passes that Markdown string into an isolated browser worker to build a clean portrait A4 PDF.

Markdown generation runs synchronously in milliseconds, while PDF typesetting runs inside a background Web Worker using portrait A4 dimensions, 10 pt sans-serif typography, GitHub-style tables, and footer page numbers.

What limits apply when inspecting huge API specs in the browser?

Browser memory comfortably inspects multi-thousand-line OpenAPI documents, though deep recursive schemas and huge JSON objects hit deliberate recursion and rendering caps. External file pointers remain unexpanded offline, and client-side rendering omits live HTTP execution against target API servers.

For stability on developer laptops, sample payload synthesis caps nested JSON depth at 4 levels and trims object previews to 12 properties per object. Very large specifications exceeding 5 MB or shipping payloads above 500 KB of generated JSON examples parse fastest when converted to concise YAML or stripped of verbose vendor extensions before loading.

Using an OpenAPI Swagger viewer locally also separates documentation review from runtime HTTP testing covered by RFC 9110. Teams archiving final release artifacts from Markdown exports frequently rely on printable PDF API booklets without cloud converters for custom margin layouts and wide multi-column pages. Pairing the built-in inspector with quick Markdown exports keeps every internal endpoint inventory offline from initial schema draft to partner sign-off.

Questions

Is it safe to paste internal OpenAPI specs into a browser viewer?

Yes. Parsing happens strictly in your browser memory, and no specification text, filename, or size is ever uploaded over HTTP. The viewer also blocks remote $ref network fetches and generates read-only cURL commands rather than firing live Try-it-out calls.

Does OpenAPI Viewer support both OpenAPI 3.1 and Swagger 2.0?

Yes. The parser detects either the openapi key for versions 3.0 and 3.1 or the legacy swagger key for version 2.0 contracts. It reads components schemas and securitySchemes alongside Swagger 2.0 definitions, securityDefinitions, host, and basePath fields.

How does $ref resolution handle circular OpenAPI schema references?

Local JSON Pointers are tracked with a visited-reference set during recursive expansion. When a nested model points back to an ancestor schema or exceeds 8 recursion levels, expansion stops cleanly and emits a circular reference placeholder instead of crashing the browser tab.

Can you export OpenAPI endpoints to Markdown or PDF offline?

Yes. Clicking Export Markdown (.md) serializes servers, security schemes, parameters, responses, and example cURL blocks into a .md file directly in memory. Clicking Export API docs (.pdf) renders that Markdown into a paginated portrait A4 PDF inside a local Web Worker.

Why does the OpenAPI viewer not send live Try-it-out HTTP requests?

Interactive API consoles often hit browser CORS errors, leak internal staging hostnames, or accidentally trigger state-changing POST and DELETE endpoints. Building static example cURL snippets lets engineers review headers and payloads safely and run requests in a terminal when ready.

Why do external file $ref links stay unresolved in offline mode?

Allowing a client-side viewer to fetch remote YAML or JSON schemas would leak spec filenames and internal URLs across the network. Bundle external references into local

Updated