YAML to Swagger JSON
Convert Swagger/OpenAPI YAML to JSON format.
Convert a Swagger or OpenAPI spec from YAML to JSON for tools, gateways and code generators that need JSON. Anchors are expanded, comments are dropped (JSON has none), and if the YAML has a syntax error you get its line and column. Conversion uses js-yaml in your browser, so internal API details stay private.
Common use cases
- Import a YAML spec into a tool that only takes JSON
- Bundle a spec for an API gateway
- Feed a code generator
How to use
- Paste the YAML spec.
- Choose the indent.
- Copy or download the JSON.
FAQ
Are $ref links resolved?
No. References stay as $ref strings, as in the original.
Will my comments be kept?
No. JSON can't hold comments, so they're removed.
Related tools
- Swagger JSON to YAMLConvert Swagger/OpenAPI JSON to YAML 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.