Swagger JSON to YAML
Convert Swagger/OpenAPI JSON to YAML format.
Convert a Swagger or OpenAPI spec from JSON to YAML, the format most people write and review API specs in. The structure, examples and $ref links are kept exactly; only the notation changes. Strings that YAML could misread, such as response codes and version numbers, are quoted. Conversion uses js-yaml in your browser.
Common use cases
- Make an exported JSON spec easier to read and edit
- Move a spec into a repository that uses YAML
- Review API changes in a pull request more easily
How to use
- Paste the JSON spec.
- Choose the indent.
- Copy or download the YAML.
FAQ
Why are response codes in quotes?
OpenAPI response codes are keys like '200'. Quoting keeps them as text, as the specification expects.
Can I check the spec too?
Paste it into the OpenAPI validator.
Related tools
- YAML to Swagger JSONConvert Swagger/OpenAPI YAML to JSON format.
- OpenAPI ValidatorValidate OpenAPI/Swagger specification documents.
- Markdown PreviewPreview Markdown content rendered as HTML in real-time.
- cURL Command GeneratorGenerate cURL commands for API requests.
- HTTP Request BuilderBuild an HTTP request with headers, auth and a body, then copy it as cURL, fetch, Python requests or HTTPie…
- JWT DecoderDecode JWT headers and claims, check expiry, and verify HS256, HS384 or HS512 signatures in your browser.