ToolGenie.org Logo

JSON Examples — Valid JSON You Can Copy

Copy a valid JSON example, then edit it in the JSON editor. These samples show objects, arrays, nested data, API responses, and config files.

JSON object example

A single record with named fields. This is the most common JSON shape for APIs and config files.

{
  "name": "Ada Lovelace",
  "role": "engineer",
  "active": true,
  "score": 98.5
}

JSON array example

A list of values. Spreadsheets and CSV converters work best when the top level is an array of objects.

[
  { "id": 1, "name": "Ada" },
  { "id": 2, "name": "Grace" }
]

Nested JSON example

Objects and arrays can contain other objects. Use a formatter or tree view when the nesting gets deep.

{
  "user": {
    "email": "ada@example.com",
    "address": { "city": "London", "country": "UK" }
  },
  "tags": ["math", "computing"]
}

API response example

A typical REST payload with metadata plus a data array.

{
  "ok": true,
  "page": 1,
  "data": [
    { "id": "u_1", "name": "Ada" },
    { "id": "u_2", "name": "Grace" }
  ]
}

Config file example

Application settings often live in a JSON object with booleans, numbers, and nested options.

{
  "theme": "dark",
  "retry": 3,
  "features": {
    "autosave": true,
    "telemetry": false
  }
}

How to Use These JSON Examples

  1. Copy a sample that matches the shape you need.
  2. Open it in the JSON editor to change field names and values.
  3. Validate, format, minify, or convert the result with the other JSON tools.

About These JSON Examples

This page is a gallery of valid JSON you can copy — not a full editor. Use the JSON editor to create a file, the validator to check a broken snippet, and JSON to CSV when the sample is an array of objects.

Frequently Asked Questions (FAQ)

What is a valid JSON example?

Valid JSON uses double quotes for keys and strings, no trailing commas, and matching brackets. The samples on this page all parse successfully.

Should I use a JSON object or a JSON array?

Use an object for one record with named fields. Use an array for a list of records. CSV conversion works best with an array of objects.

Can I edit these JSON examples?

Yes. Click Open in JSON editor to load the sample into the editor, then format, validate, or download it.

Why is my JSON invalid when I add comments?

Standard JSON does not allow comments or single quotes. Remove them and validate the file with the JSON validator.

Where can I check a broken JSON sample?

Paste it into the JSON validator to see the exact error line.

Tips for Learning JSON from Examples

  • Change one field at a time, then validate so you see which edit broke the file.
  • Compare an object example with an array example before you pick a CSV shape.
  • Keep a valid sample nearby when you are fixing unexpected token errors.