Input
Sample
Output

JSON Counter

Ln : 1 Col 0
Size: 0 B
A+
A-
Try a sample
Ad blocking? It's okay.

Please share to support us:



Results
Paste JSON on the left, or pick a sample. The counts appear here.
Runs in your browser. Your JSON is not uploaded.
Runs in your browser. Your JSON is not uploaded.
Ad blocking? It's okay. Please share to support us:

How to count items in JSON


  1. Paste your JSON in the left editor, upload a file or fetch a URL with Load Data, or try one of the samples.
  2. The results update as you type. For files over 2 MB, press Count JSON.
  3. Click any row under Every path to jump to that line in the editor.
  4. Use CSV to download every path with its type and count, or Copy for a plain-text summary.

Counting happens in your browser. The JSON you paste or upload is not sent to our server.

If the JSON is invalid, the counter tells you what is wrong and on which line, for example a trailing comma or a key in single quotes.

What each number means

Top level
Whether the JSON starts with an object or an array, and how many keys or items it has. For an API that returns a list, this is the number of records.
Objects, arrays and keys
Every { } and [ ] in the document, at any depth. Keys is the total of all keys in all objects.
Values by type
Strings, numbers, booleans (true and false), nulls, objects and arrays, each counted once.
Max depth
The number of steps from the top to the deepest value. 0 to 1 is a simple flat list, 2 to 3 is a typical API response, and 4 or more is deeply nested.
Count by level
How many objects, arrays and plain values sit at each depth, so you can see where the bulk of the data is.
Keys in repeated objects
For lists of similar objects, how many of them have each key. email: 3 of 4 means one record has no email.
JSON tree
An outline of the data's shape. Each key appears once, even if it repeats in a thousand records, with its type and count, so you can read the schema of a large file at a glance.
Every path
Each distinct path, with [*] standing for any array item, for example $.data[*].price, with its type, how many times it occurs, and array sizes from smallest to largest.

To pull out only some of the items, use the JSON Filter; to read the data as a tree, use the JSON Viewer.

Updated November 2026

FAQs


Paste the JSON. The Top level card shows, for example, Array, 250 items. Every nested array is listed under Every path with its number of items.

Paste the response or fetch the URL with Load Data. If the records are in a key such as data, find $.data under Every path: its count is the number of records.

The number of steps from the top to the deepest value. In {"a": {"b": [1]}} the number 1 is at depth 3: the outer object, the inner object, the array, then the value.

Look at Keys in repeated objects. For each list of objects it shows how many have each key, and highlights keys that are missing from some of them.

Yes. The Keys card is the total number of keys in all objects, and the paths table shows each key separately.

Open the JSON Tree. It shows every key once, nested as in the data, with its type and how often it occurs. Click a name to jump to its first line.

Any item of an array. $.users[*].email covers the email of every user, so its count tells you how many users have an email.

Yes. CSV downloads every path with its type, count, array sizes and line number. Copy and Download give a plain-text summary.

Yes. A 10 MB file is counted in about a second on a typical computer. Above 2 MB the counter waits for you to press Count JSON instead of counting on every keystroke.

No. The JSON is read and counted in your browser. Nothing you paste or upload is sent to our server.