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

  1. Paste the YAML spec.
  2. Choose the indent.
  3. 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.