# How to validate the JSON API format

**URL:** https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147
**Category:** Uncategorized
**Created:** [October 7, 2015, 2:03am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147 "2015-10-07T02:03:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![agarwalmk](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/agarwalmk/32/81_2.png) [@agarwalmk](https://discuss.jsonapi.org/u/agarwalmk)
#### Post date: [October 7, 2015, 2:03am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/1 "2015-10-07T02:03:35Z")

</div>

I need to know if the following JSON is a valid JSON API format:

{  
“labels” : [“BANNABLE”, “MIN-BAR”, “Malware”, “Risky”]  
}

Is there any online validator? Can the people in this group validate please?

---

<div class="post-metadata">

### Author: ![askar](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/askar/32/78_2.png) [@askar](https://discuss.jsonapi.org/u/askar)
#### Post date: [October 8, 2015, 8:04am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/2 "2015-10-08T08:04:16Z")

</div>

I think you can validate your snippet with a regular JSON validator like this one [http://jsonlint.com/](http://jsonlint.com/)

---

<div class="post-metadata">

### Author: ![ethanresnick](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@ethanresnick](https://discuss.jsonapi.org/u/ethanresnick)
#### Post date: [October 11, 2015, 11:48pm UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/3 "2015-10-11T23:48:42Z")

</div>

Hi,

If that is your full request/sesponse body, then no, it’s not valid JSON API. In JSON API, all data must be under aa top-level `data` key (or a `meta` key for metadata).

There is a [JSON Schema document](http://jsonapi.org/faq/#is-there-a-json-schema-describing-json-api) for the JSON API spec, which (with [a few small caveats](https://github.com/json-api/json-api/issues/851)) can be used to validate whether any JSON document is valid JSON API. Just put your document and that schema into a JSON Schema validator, like [this one](http://jsonschemalint.com/draft4/), and it should tell you if your document is valid.

---

<div class="post-metadata">

### Author: ![Xavier](https://avatars.discourse-cdn.com/v4/letter/x/2bfe46/32.png) [@Xavier](https://discuss.jsonapi.org/u/Xavier)
#### Post date: [September 6, 2017, 6:40am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/4 "2017-09-06T06:40:44Z")

</div>

Use this tool: JSON Formatter [https://jsonformatter-online.com](https://jsonformatter-online.com)

---

<div class="post-metadata">

### Author: ![jamesmalvi](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@jamesmalvi](https://discuss.jsonapi.org/u/jamesmalvi)
#### Post date: [September 14, 2017, 10:05am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/5 "2017-09-14T10:05:53Z")

</div>

Use one of the best JSON tools.

- [https://jsonformatter.org](https://jsonformatter.org)

- [JSON Viewer](https://codebeautify.org/jsonviewer)

---

<div class="post-metadata">

### Author: ![krutik](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@krutik](https://discuss.jsonapi.org/u/krutik)
#### Post date: [August 11, 2020, 10:17am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/6 "2020-08-11T10:17:08Z")

</div>

Hii  
You can also use [https://onlinejsontools.org/](https://onlinejsontools.org/) for json validator,beautify,minify,xml,yaml,CSV,bson,plain text,base64,tsv.  
Do checkout this site!

---

<div class="post-metadata">

### Author: ![rmahale](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rmahale](https://discuss.jsonapi.org/u/rmahale)
#### Post date: [August 29, 2024, 4:33pm UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/7 "2024-08-29T16:33:15Z")

</div>

I personally use [https://www.jsonslint.com](https://www.jsonslint.com) it has all json tools for validation and creation

---

<div class="post-metadata">

### Author: ![surabhi](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@surabhi](https://discuss.jsonapi.org/u/surabhi)
#### Post date: [April 2, 2025, 9:13am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/8 "2025-04-02T09:13:24Z")

</div>

While there are tons of tools around the web, I recently came across this absolutely new [JSON-Validate](https://json-validate.com/) website.

Do try this out … Have been using it for a while now!

---

<div class="post-metadata">

### Author: ![Mathew78](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/mathew78/32/935_2.png) [@Mathew78](https://discuss.jsonapi.org/u/Mathew78)
#### Post date: [May 8, 2025, 9:00am UTC](https://discuss.jsonapi.org/t/how-to-validate-the-json-api-format/147/9 "2025-05-08T09:00:32Z")

</div>

I’ve been using the JSON API schema from [jsonapi.org](http://jsonapi.org) to validate my responses. Tools like JSONLint and Assertible are quite helpful for this. They assist in ensuring that the structure aligns with the JSON API specifications. However, I’ve noticed that some edge cases require manual checks, especially when dealing with complex relationships.
