Home › Developer Tools › OpenAPI / Swagger Viewer

OpenAPI / Swagger Viewer

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:

Advertisement
Advertisement

How to use the OpenAPI / Swagger Viewer

  1. 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.
  2. Click View docs (or just keep typing: the view updates automatically).
  3. 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.
  4. Fix problems: the Problems tab lists errors and warnings with the JSON path where they occur.
  5. Open Swagger UI for the classic interactive view, or download the spec converted to JSON or YAML.

OpenAPI document structure

SectionOpenAPI 3.xSwagger 2.0
Version fieldopenapi: 3.0.3 or 3.1.0swagger: "2.0"
API detailsinfo (title and version required)info
Base URLservers[].urlschemes + host + basePath
Endpointspaths (optional in 3.1 with webhooks)paths
Request bodyrequestBody.content per media typea parameter with in: body
Reusable schemascomponents.schemasdefinitions
Authenticationcomponents.securitySchemessecurityDefinitions
Response schemaresponses.200.content['application/json'].schemaresponses.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.

Related tools

JSON FormatterBeautify, minify and validate JSON, with a collapsible tree view.YAML Validator & FormatterValidate, format and minify YAML, and convert YAML to JSON or back.YAML to JSON ConverterConvert YAML to pretty or minified JSON, with errors pinned to the exact line.JSON ViewerExplore JSON as a collapsible tree, search keys and values and copy any node's path.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.Docker Compose to KubernetesConvert docker-compose.yml into Kubernetes Deployment, Service, ConfigMap and PVC manifests.Docker Compose ValidatorCheck a docker-compose.yml for YAML errors, schema mistakes, broken references and deprecated keys.Dockerfile LinterLint a Dockerfile for best practices: pinned tags, apt cleanup, non-root USER and layer count.Dockerignore GeneratorBuild a .dockerignore from Node, Python, Go and Java templates, plus your own entries.ESLint Config GeneratorGenerate a flat eslint.config.js for JavaScript, TypeScript, React or Node with rule presets.Git Branch Name GeneratorTurn a ticket ID and title into a clean, valid git branch name like feature/PROJ-12-add-login.GitLab CI Config GeneratorGenerate a .gitlab-ci.yml with stages, jobs, images, cache, artifacts and rules from templates.Jinja2 Template TesterRender Jinja2 templates with YAML or JSON variables using real Jinja2, with clear error lines.JSON Schema Mock Data GeneratorGenerate realistic sample JSON from a JSON Schema: formats, patterns, $ref, seeds and counts.Kubernetes Secret GeneratorCreate Kubernetes Secret YAML from key/value pairs or .env with auto base64, or decode one.Kubernetes YAML ValidatorValidate Kubernetes manifests against the API schema of a chosen version, with error paths.Prettier Config GeneratorToggle Prettier options, preview formatted code live and copy your .prettierrc file.Quartz Cron GeneratorBuild and explain Quartz and Spring cron expressions with seconds, ?, L, W and #, plus next fire times.README Badge GeneratorCreate Shields.io-style README badges for license, version, build and custom labels.Systemd Service File GeneratorCreate a systemd .service unit with ExecStart, user, restart policy, environment and hardening.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.GitHub Actions Workflow GeneratorBuild a GitHub Actions CI workflow: triggers, matrix, caching, tests, Pages or Docker deploy.Kubernetes YAML GeneratorGenerate Deployment, Service, Ingress, ConfigMap, Secret and HPA manifests with safe defaults.Markdown TOC GeneratorGenerate a linked table of contents from Markdown headings with GitHub-style anchors.OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI ValidatorValidate OpenAPI 3.0/3.1 and Swagger 2.0 specs: schema errors, broken $refs, line numbers.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.
See all 85 Code Generators & Builders →