OpenAPI Converter
Convert OpenAPI JSON to YAML and back, or generate a minimal OpenAPI 3.1 skeleton, in the browser.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Converted the document json to yaml (66 character(s)).
How it works
- Parsed the input with the JSON↔YAML engine, which rejects anchors, aliases and multi-document streams.
- Emitted YAML 1.2 block style with scalars quoted where needed.
- The result round-trips through the opposite direction without a semantic change.
- Everything is computed in the browser; the document is never uploaded.
Methodology
- For json-to-yaml, parse the JSON with the verbatim scanner and emit YAML 1.2 block style.
- For yaml-to-json, parse the YAML core schema and emit JSON, reporting lossy scalar steps.
- For skeleton, build an OpenAPI 3.1 document with an info block, one server and one example operation.
- Return the result with any warning notes; never throw for a rejected document.
Usage
- Choose JSON to YAML, YAML to JSON, or skeleton.
- Paste the document for a conversion, or set the title and version for a skeleton.
- Copy the result; check any notes before using it.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
OpenAPI JSON to YAML
{
"text": "{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Items API\",\"version\":\"1.0.0\"},\"paths\":{}}",
"mode": "json-to-yaml",
"title": "",
"apiVersion": ""
}Generate a skeleton
{
"text": "",
"mode": "skeleton",
"title": "Inventory API",
"apiVersion": "0.1.0"
}Limitations
Format is a presentation choice
OpenAPI documents are the same data whether written as JSON or YAML. JSON is strict and easy to diff mechanically; YAML is easier to hand-edit and is common in repositories. Converting between them changes only the serialization, so the API description is unchanged.
A skeleton, not a specification
The generated document is deliberately minimal: one server, one path, one response. It exists to give you a valid starting point that tooling accepts, not to infer your API's resources. Replace the example path and responses with your real ones.
Frequently asked questions
- Does JSON to YAML round-trip exactly?
- For JSON-compatible documents the values are preserved. YAML typing can change the spelling of a scalar (for example, a quoted number stays a string), and any lossy step is reported as a note.
- Is the generated skeleton valid OpenAPI?
- Yes. It is an OpenAPI 3.1 document with an info block, a server and one example path with a response, and the OpenAPI Viewer parses it.
- Is my document sent anywhere?
- No. The conversion and generation happen entirely in your browser; the document is never uploaded, stored or logged.
Sources
- OpenAPI Specification 3.1.0 — OpenAPI Initiative
- YAML 1.2.2 Specification — YAML Language Development Team
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.