API: Validate & convert utility
OpenAPI Formatter
Format OpenAPI documents as readable JSON or YAML.
● This tool runs entirely in your browser. Your input is never uploaded to our servers.
Output
Your result will appear here…
How to use OpenAPI Formatter
- Paste an OpenAPI document in YAML or JSON.
- Select Format to parse and normalize it.
- Copy the formatted document in its original format.
Example
Input / settings:
openapi: 3.0.3
info:
title: Example API
version: 1.0.0
paths:
/health:
get:
responses:
'200':
description: OKOutput:
openapi: 3.0.3
info:
title: Example API
version: 1.0.0
paths:
/health:
get:
responses:
"200":
description: OKWhen to use
- Clean up an API specification.
- Improve readability before code review.
- Normalize indentation for source control.
Overview
Format OpenAPI documents as readable JSON or YAML.
Supported input
One YAML or JSON document whose root is an object.
Output details
Readable JSON for JSON input, or serialized YAML for YAML input.
Limitations
- Formatting does not validate the OpenAPI version or schema; non-OpenAPI objects can also be formatted.
- Comments, anchors, whitespace, and number precision may change during parsing and serialization. $ref strings are preserved without resolution.
Privacy and security
This tool runs entirely in your browser. Your input is never uploaded to our servers.
References
Frequently asked questions
Does formatting change the API behavior?
It parses and serializes the document; review scalar types and comments because comments and formatting may not be preserved.
Does it support both formats?
Yes. JSON input remains JSON and YAML input is formatted as YAML.
Is the document uploaded?
No. Formatting runs in your browser.