JSON:API 1.0 & 1.1 · Free · Open source

A JSON:API viewer that follows relationships all the way down

Paste a JSON:API response and inspect every resource, relationship, and included object — recursively. Validate the document against the spec, copy resolved plain JSON, and explore the relationship graph. No signup, no upload: everything runs in your browser. It also opens ordinary JSON as a plain tree, so any document you paste is readable.

Free and open source Files never leave your browser No account required
JSON:API Lens showing a screen resource with widgets, blocks, and actions expanded recursively
Features

Built for JSON:API, not just JSON

A generic formatter shows nested braces. Lens understands type/id linkage, compound documents, and the rules in the JSON:API specification.

Recursive relationships

Follow author → employer → owner across included resources at any depth. Cycles are detected and explained instead of looping forever.

JSON:API validation

Structural checks for JSON:API 1.1: types and string ids, reserved members, relationship shape, duplicates, full linkage, and error documents — each with a JSON pointer.

Resolved JSON copy

Copy any resource as plain JSON with attributes flattened and relationships inlined. Missing targets and cycles are marked explicitly, so the output is safe to paste anywhere.

Relationship graph

See the whole compound document as a layered graph. Pan, zoom, inspect edges, and reveal unresolved sparse-linkage targets when you need them.

Sparse linkage handling

A relationship may legally point to a resource that is not included. Lens keeps those targets visible as missing chips with the exact pointer instead of silently dropping them.

Large documents

Tested with responses up to 50 MB and hundreds of thousands of resources. Paged rendering and preview limits keep the page responsive instead of freezing the tab.

How it works

Three steps to a readable response

Paste, upload, or fetch

Paste a response into the editor, drop a .json file, or fetch a URL directly. Files are parsed locally and never uploaded.

Expand relationships

Click a relationship to follow it, or use Expand all up to your chosen depth. Every hop keeps a breadcrumb and a JSON pointer.

Validate and copy

Review the Issues tab for spec violations, then copy resolved JSON for a single resource or the whole document.

Why a dedicated tool

Why not just a JSON formatter?

JSON:API moves relationship data out of the resource and into resource linkage. Most JSON API viewers stop after one level of expansion; to understand a real response you have to resolve type and id pairs against the included array — often several hops deep.

A formatter cannot tell you that people:9 is the author, that the author's employer is missing from the response, or that an included resource is never referenced. Lens can.

Comparison of a generic JSON formatter and JSON:API Lens
Task JSON formatter Lens
Pretty-print nested JSON Yes Yes
Resolve type/id linkage No Yes
Expand relationships recursively No Yes
Detect cycles and missing resources No Yes
Validate JSON:API 1.1 structure No Yes
Export a resource as plain JSON No Yes
Background

JSON:API in 30 seconds

JSON:API is a specification for building APIs in JSON. It standardises resource objects, relationships, compound documents, errors, pagination, filtering, and sparse fieldsets, using the media type application/vnd.api+json.

A document has top-level data (one resource or a collection) and optionally included, links, meta, jsonapi, or errors. Each resource has a type, an id, and optional attributes and relationships.

Read the full specification at jsonapi.org, or see how relationships and included resources work.

{
  "data": {
    "type": "articles",
    "id": "1",
    "attributes": { "title": "JSON:API paints my bikeshed!" },
    "relationships": {
      "author": {
        "data": { "type": "people", "id": "9" }
      }
    }
  },
  "included": [
    {
      "type": "people",
      "id": "9",
      "attributes": { "name": "Dan Gebhardt" }
    }
  ]
}

The relationship only contains a pointer. The actual person lives in included. Lens resolves that pointer for you — and keeps going from there.

FAQ

Frequently asked questions

What is a JSON:API viewer?

A JSON:API viewer reads a JSON:API document and shows its resources, relationships, and included objects in a structured way. Unlike a plain JSON formatter, it resolves type/id linkage so you can follow relationships instead of reading raw JSON by hand.

Is JSON:API Lens free?

Yes. JSON:API Lens is free and open source. There is no signup, no paid tier, and no server-side processing.

Is my JSON:API data uploaded anywhere?

No. Parsing, validation, and rendering happen entirely in your browser. If you fetch a URL, the request goes directly from your browser to that API, subject to its CORS policy.

Does it validate JSON:API 1.1?

JSON:API Lens checks structural JSON:API 1.1 rules: required type and string id members, reserved field names, attribute/relationship collisions, relationship shape, duplicate resources, full linkage, resource identifier objects, and error document structure. Business rules are out of scope.

Why are some relationships marked as missing?

JSON:API allows sparse linkage: a relationship can point to a resource that is not present in data or included. Lens keeps those targets visible as missing chips with their JSON pointer so you can tell an intentionally omitted resource from a broken document.

How large a JSON:API document can it handle?

The viewer handles documents up to 50 MB. It renders primary resources, included resources, and validation issues in pages so the page stays responsive, and it summarizes values that are too large or too deeply nested to preview.

Can I copy a resource as plain JSON instead of JSON:API?

Yes. The copy button on any resource card produces plain JSON: attributes are flattened and relationships are replaced with the resolved resource data, recursively. Missing targets and cycles are marked explicitly.

Open a JSON:API response and make sense of it

Free, private, and no account required. Works with JSON:API 1.0 and 1.1.

Open the viewer →