Skip to content
Marvin's Toolbox.

OpenAPI Viewer

Open an OpenAPI or Swagger spec in JSON or YAML and browse it as readable docs. Search endpoints, group them by tag, see parameters, request bodies, responses and schemas with $ref resolved, and copy a ready cURL command for any operation.

Runs entirely in your browser. Nothing you put in here gets uploaded.

Spec

Drop an OpenAPI or Swagger file here

OpenAPI 3.0, 3.1 and Swagger 2.0, as JSON or YAML.

Next steps

Send this tool's output straight into another tool.

Paste a cURL command and get the same request as JavaScript fetch, Python requests, Go net/http, PHP, Rust and more. Headers, cookies, auth, form data and JSON bodies carry over, and a fetch() call can be turned back into a cURL command.

Paste JSON to explore it as a collapsible, searchable tree, hide the fields you don't need, and see the structure it implies as a badge-annotated schema and a copyable TypeScript interface.

Convert config and data between JSON, YAML, TOML, JSON5, INI, XML, CSV and .env. Type or paste on the left, pick the output format on the right, and copy the result. Includes a format button and a minify toggle.

Compare two JSON documents by structure and see every added, removed and changed key and value with its exact path. Browse the result as a tree, a filterable change list or a line diff, ignore array order, catch type changes and export the changes as a JSON report.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

About the OpenAPI Viewer Tool

This tool turns an OpenAPI or Swagger document into docs you can actually read. Drop in a file or paste the text, in JSON or YAML, and you get the API's servers and security schemes, every endpoint grouped by tag, and each schema as a nested tree with $ref resolved.

Pick an operation to see its parameters, request body and responses, with example payloads built from the schemas, and copy a cURL command with the server, parameters, auth placeholders and body already filled in. A spec with mistakes still opens, with its problems listed above the docs.

What you can do

  • View an OpenAPI 3.0 or 3.1 spec as readable documentation
  • Open a Swagger 2.0 file without converting it first
  • Read a spec in YAML or JSON
  • Search endpoints by path, summary or operation id
  • Filter endpoints by HTTP method and hide deprecated ones
  • See a schema with allOf, oneOf and anyOf as one nested tree
  • Generate example JSON from a schema
  • Turn an OpenAPI operation into a cURL command
  • Find broken references and other structural problems in a spec
  • Browse specs with more than a thousand operations

How to use the OpenAPI Viewer

  1. 1Drop a spec file into the tool, paste the text on the Paste tab, or press Load sample to try it.
  2. 2Check the problems list if one appears, then pick the server your cURL commands should target.
  3. 3Search or filter the endpoint list and select an operation.
  4. 4Read its parameters, request body and responses, and switch a body to Example to see a payload.
  5. 5Follow any schema name to the Schemas section, then use the back button to return to the operation.
  6. 6Fill in parameter values if you like and copy the cURL command.

Swagger 2.0 and OpenAPI 3

Swagger 2.0 and OpenAPI 3 describe the same things in different places. Swagger keeps the server in host and basePath, sends bodies as a parameter and lists media types in consumes and produces. The viewer reads all of these into one model, so an old Swagger file looks the same as a current OpenAPI 3.1 spec. Webhooks from 3.1 show up as their own group.

To read the raw document instead, send the spec on as JSON to the JSON Inspector, or switch its format in the Config Converter.

References and invalid specs

Every $ref inside the document is followed, including schemas that contain themselves. Those are marked as circular and link back to the schema instead of expanding forever. A reference to another file or URL is not fetched. It is flagged where it appears and listed in the problems, and the rest of the spec still renders.

The structural checks look for things like missing info fields, path parameters that are used but never declared, duplicate operation ids, undefined security schemes and references that point at nothing. They are not a full schema validation, so a clean result does not prove a spec is valid.

Example payloads and cURL commands

Examples from the spec always come first, so example, examples, default, const and enum are used as written. When a schema gives no example, one is made up from its types and formats, leaving out readOnly fields in requests and writeOnly fields in responses.

The cURL command keeps anything unknown as a visible placeholder such as <token> or <petId>, so replace those before you run it. There is no button to send the request from this page, because most APIs block calls from other websites through CORS and the result would say more about the browser than about the API. Run the command in a terminal, or turn it into code with the cURL Converter.

Large specs

The endpoint and schema lists only draw the rows on screen, and details are built when you open them, so specs with thousands of operations stay quick to browse. Specs up to about one megabyte are remembered between visits. A bigger one works normally but has to be loaded again after a reload.

Tools that share a tag with this one.

Format code in JavaScript, TypeScript, JSON, JSON5, HTML, Vue, CSS, SCSS, LESS, Markdown, YAML, GraphQL, XML and SQL. Pick tabs or spaces, set the indent width, and format the input in place with one click.

Convert config and data between JSON, YAML, TOML, JSON5, INI, XML, CSV and .env. Type or paste on the left, pick the output format on the right, and copy the result. Includes a format button and a minify toggle.

Turn docker run commands into a docker-compose.yml, or a compose file back into docker run. Ports, volumes, environment variables, networks, restart policies and resource limits carry over.

Generate realistic fake data for testing: names, emails, addresses, phone numbers, companies, internet data, dates and more. Tick the fields you need, set how many rows you want and a locale, then copy or download the result as JSON, CSV or plain text.

Drop a HAR export from your browser's network tab and see every request on a waterfall timeline. Inspect status codes, timings, sizes, headers and payloads, filter by type or URL, and spot the slow requests at a glance.

Run real jq 1.8 filters against your JSON. Toggle options like slurp and raw output, browse a cheat sheet of common filters, and copy or forward the result.