OpenAPI JSON Validator
Paste the contents of your openapi.json or swagger.json file and get a structural check in seconds. The validator confirms the JSON parses, the version field is present, info has a title and a version, and paths exists, then warns about odd path names and unknown operation keys.
How to validate an OpenAPI JSON file
-
1
Copy the file
Open your `openapi.json` and copy the whole document, from the opening brace to the closing one.
-
2
Paste it into the box
Paste it into the OpenAPI / Swagger document field. No need to remove whitespace or reformat it.
-
3
Run the check
Continue to the results step to run the validation.
-
4
Fix and repeat
Edit the file for each error, paste it again and re-run until the report shows no errors.
Common JSON mistakes behind a failed check
JSON is stricter than YAML, so most failures on a hand-edited file come from syntax rather than from the API design. The usual causes are a trailing comma after the last property, single quotes instead of double quotes, a comment (JSON does not allow them), or a missing closing brace after a long paths object. A broken file typically ends in the message “Could not parse as JSON or YAML”, or in missing-field errors because nothing usable was read.
If you only see a parse error, find the syntax slip first. The structural checks run once the document reads as an object.
A worked example
Take this small document:
{
"openapi": "3.0.3",
"info": { "title": "Orders API" },
"paths": {
"orders": { "get": { "summary": "List orders" } }
}
}
It parses, and the openapi field and paths object are present. The report would still show:
| Finding | Type | Why |
|---|---|---|
| info.version is required. | Error | info has a title but no version |
| Path ‘orders’ should start with ‘/’. | Warning | The path key has no leading slash |
Because there is one error, the document is not reported as valid. Add "version": "1.0.0" to info and rename the key to /orders. A second run clears both findings.
What a pass does and does not mean
A clean report means the skeleton is right. It does not follow $ref links, check schemas or confirm that every operation has responses. Treat it as a quick gate before you commit the file, then run a full linter for deeper rules.
A practical workflow for JSON specs
Keep the spec in version control and paste it here before each commit that touches paths. Because the check is quick, it works as a sanity step after merging changes from several people, when duplicated keys or a misplaced brace are most likely. If your JSON is generated by a build script, paste the generated output rather than the template, so you test what readers will actually receive. When the report is clean, share the file or hand it to a documentation generator with more confidence that the top-level structure is sound.
Frequently Asked Questions
No. Whitespace and indentation do not matter. Paste the file as it is.
Standard JSON does not allow a comma after the last item in an object or array, so the document cannot be read as JSON. Remove the comma and run the check again.
Yes. The version check accepts either an openapi field or a swagger field, so Swagger 2.0 and OpenAPI 3.x JSON files both go through the same structural check.
No. Findings are listed as messages, such as a missing field or a path name, without line numbers. Search your file for the key named in the message.
Related Tools
Color Wheel Explorer
Explore the colour wheel interactively. Rotate harmonies, compare HSL vs RYB, spot complementary and triadic pairs in real time.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
Random Phone Number Generator
Generate 1 to 50 fictional phone numbers from officially reserved ranges for the US, Canada, UK, Australia or Germany.
Placeholder Image Generator
Create a 1–4000 px placeholder with custom colors and text, download it as PNG, or copy a URL and HTML image tag.
GitHub Profile README Generator
Build the README.md for your GitHub profile page (the username/username repo) with tagline, skills, stats cards and language breakdown.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
Tool available in other languages
- مدقق OpenAPI بصيغة JSON [AR]
- OpenAPI JSON バリデーター [JA]
- OpenAPI JSON Validator [DE]
- OpenAPI JSON-validerare [SV]
- Validador de OpenAPI JSON [PT]
- OpenAPI JSON 검증기 [KO]
- Validateur OpenAPI JSON [FR]
- OpenAPI JSON Validator [NL]
- ตัวตรวจสอบ OpenAPI JSON [TH]
- Công cụ kiểm tra OpenAPI JSON [VI]
- Validador de OpenAPI JSON [ES]
- Walidator OpenAPI JSON [PL]
- Validator OpenAPI JSON [ID]
- OpenAPI JSON 验证器 [ZH]
- Validatore OpenAPI JSON [IT]
- Валидатор OpenAPI JSON [RU]
- OpenAPI JSON Doğrulayıcı [TR]