Too Much Tools logoToo Much Tools

OpenAPI Viewer

Explore an OpenAPI/Swagger spec (JSON or YAML) and generate C# models from its schemas, locally.

Local, Runs entirely in your browser, your data never leaves your device.
Loading tool…

Browse an OpenAPI spec and generate C# models from its schemas

Paste an OpenAPI 3.x or Swagger 2.0 document and this tool reads its info block, walks every path for get/post/put/delete/patch/options/head operations, and lists the component schemas by name. Switch to the C# models tab to turn each schema's properties into a public class with typed properties. It is a quick way to explore an unfamiliar spec or scaffold DTOs for a .NET client without installing a code generator, and the parsing happens in your browser tab.

How to use the OpenAPI Viewer

  1. Paste your spec into the left editor as JSON or YAML, or start from the built-in example spec.
  2. Read the Overview tab for the API title, version, OpenAPI/Swagger version and a list of every path and HTTP method.
  3. Switch to the C# models tab to see each entry under components.schemas (or Swagger 2.0 definitions) rendered as a C# class.
  4. Copy the generated classes or use Send To to pass them into another tool.

Type mapping is intentionally simple: integer becomes int (or long for format int64), number becomes double, string becomes DateTime for date/date-time formats and string otherwise, arrays become List<T>, and anything without a recognized type falls back to object.

This is a reader and generator, not a validator, so it will not catch a spec that violates the OpenAPI schema itself; it just needs valid JSON or YAML with the shapes it looks for. Property names that don't match their Pascal-case C# form get a [JsonPropertyName] attribute automatically.

Frequently asked questions

Does this tool support Swagger 2.0 as well as OpenAPI 3?
Yes, it reads openapi or swagger from the document to report the spec version, and looks for schemas under components.schemas (OpenAPI 3) or definitions (Swagger 2.0) when listing and generating models.
Can I paste a YAML spec instead of JSON?
Yes, the parser first tries JSON.parse and falls back to a YAML parser if that fails, so both .json and .yaml OpenAPI files work without converting the format first.
Does it validate my OpenAPI spec against the official schema?
No, it only extracts info, paths and schemas well enough to list operations and generate C# classes; a spec with structural mistakes elsewhere may still parse without any warning from this tool.
What happens if my spec has no component schemas?
The Overview tab still lists paths and operations normally, but the C# models tab shows a comment noting there are no schemas to generate instead of an empty or broken class list.