
Code in, formatted spec out
1/6Compare your original document with the formatted output side by side while sort, filter, and overlay settings update the result immediately.
Trusted by the OpenAPI community
More OpenAPI tools from the community can be found on openapi.tools .
Alphabetically sort fields, paths, and components for consistent ordering.
Read docsRemove internal endpoints, tags, or unused components before publishing.
Read docsStandardise casing, indentation, and structure across your specs.
Read docsApply overlays to add or override parts of your OpenAPI document.
Read docsSplit large specs into files or bundle multiple files into one.
Read docsConvert between JSON and YAML, or between OpenAPI versions.
Read docsStrip internal endpoints and sort your spec before publishing external documentation.
Keep large OpenAPI files readable and diff-friendly for easier code reviews.
Automate formatting and filtering in your pipeline to enforce spec standards.
Before
openapi: 3.0.3
info:
title: Pet Store API
version: 1.0.0
paths:
/pets/{petId}:
get:
summary: Get pet by ID
/pets:
post:
summary: Create a pet
get:
summary: List all pets
components:
schemas:
Pet:
type: object
Error:
type: objectAfter
openapi: 3.0.3
info:
title: Pet Store API
version: 1.0.0
paths:
'/pets':
get:
summary: List all pets
post:
summary: Create a pet
'/pets/{petId}':
get:
summary: Get pet by ID
components:
schemas:
Error:
type: object
Pet:
type: objectStart with the basics: format, sort, filter, and convert your OpenAPI files with a single CLI.
Format a spec
npx openapi-format openapi.yaml -o formatted.yamlSort & filter
npx openapi-format openapi.yaml --sortFile sort.json --filterFile filter.jsonConvert to JSON
npx openapi-format openapi.yaml -o openapi.jsonInstall
npm install --save openapi-formatThe online playground lets you format, filter, sort, compare, and preview OpenAPI documents without installing anything locally.
Test config ideas, validate overlays, preview changes to your OpenAPI spec, and share the final result.

Compare your original document with the formatted output side by side while sort, filter, and overlay settings update the result immediately.

Switch the output pane from raw code to a docs preview to inspect operations, parameters, and responses without leaving the playground.

Move between code, UI editing, and preview modes depending on whether you want to inspect structure, tweak operations, or validate the result.

Use the filter dialog to narrow the document by operation IDs, methods, tags, and other dimensions before exporting a cleaner public version.

Build and inspect overlay actions in a structured UI so targeted updates are easier to review than hand-editing larger documents.

Open a focused before-and-after diff to verify exactly what changed before you copy the output back into your project.
Bring `openapi-format` into Claude, OpenAI Codex, and other agent-based workflows through Skills so OpenAPI tasks stay grounded in a consistent CLI-based workflow.
Add the `openapi-format` skill to your local skills setup so LLM-assisted OpenAPI work stays predictable across editing, cleanup, and review tasks.
Install Command
npx skills add https://github.com/thim81/openapi-format --skill openapi-format Prompt Example
Use openapi-format on ./openapi.yaml to sort paths by tags, remove internal endpoints, and write the result to ./openapi-public.yaml. Show me the exact command and the filter config you used. Claude, Codex, and similar agents can rely on the same openapi-format behavior instead of inventing formatting rules on the fly.
Use agents to sort, filter, inspect, and refine OpenAPI files while keeping the actual spec transformations grounded in a real tool.
Keep agent output in a real CLI workflow so OpenAPI changes are easier to inspect, reproduce, and trust.