OpenAPI 3 Spec Generator
Describe your API once and get a valid OpenAPI 3.0.3 document out. Add endpoints with their methods, paths, parameters, request body fields and responses, and the generator assembles the paths, schemas and info block for you in both YAML and JSON.
How to generate an OpenAPI spec
- Fill in the API title, version and an optional server URL.
- Add an endpoint card per route: pick a method, set the path, then add parameters, body fields and responses.
- Switch between YAML and JSON, then copy or download the spec.
Examples
GET /users with a query parameter
title: Users API, GET /users, query param "limit" (integer), response 200
openapi: 3.0.3
info:
title: Users API
version: 1.0.0
paths:
/users:
get:
summary: List users
parameters:
- name: limit
in: query
required: false
schema:
type: integer
responses:
"200":
description: A list of usersFrequently asked questions
What is OpenAPI, and how does it relate to Swagger?
OpenAPI is the specification for describing HTTP APIs in a machine-readable document. Swagger was the original name and now refers to the tooling (Swagger UI, Swagger Editor) built around OpenAPI. This generator produces OpenAPI 3.0.3, which those Swagger tools read directly.
Which version of OpenAPI does it output?
It outputs OpenAPI 3.0.3. The document starts with openapi: 3.0.3 and includes an info block, optional servers, and a paths object with operations, parameters, request bodies and responses.
Why are path parameters always marked required?
The OpenAPI spec requires every path parameter to be required, because the URL cannot be matched without it. Query and header parameters honor the required toggle you set, but path parameters are forced to required to keep the document valid.
How are request bodies described?
Each body field you add becomes a property in a JSON object schema under content application/json. Fields you mark required are listed in the schema's required array, and the request body itself is marked required when at least one field is required.
Can I get the spec as JSON instead of YAML?
Yes. Use the YAML and JSON toggle to switch the output format. Both represent the same document, so you can copy whichever your tooling expects or download it as a file.
Is my API definition sent to a server?
No. The whole spec is built in your browser, so your endpoints, paths and field names never leave your machine.
Related tools
JSON Schema Generator
Generate a JSON Schema from a JSON sample. Infers types, properties and required fields as draft-07, ready to copy or download. Runs in your browser.
YAML Formatter
Format and validate YAML online. Fix indentation, normalize messy YAML, sort keys and catch syntax errors. Runs entirely in your browser.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.
Base58 Encoder
Encode and decode Base58 online with the Bitcoin alphabet. Convert text to Base58 or back, UTF-8 safe, no confusing 0 O I l. Runs in your browser.