JSON Data Counter - Json Count

Paste JSON or hit an API — see top-level and every sub-level count instantly.

Try a sample:

API must allow CORS. Try JSONPlaceholder, REST Countries, or Open-Meteo.

Quick fill:

All levels — count breakdown

Every array and object found, with item count and path
LevelPathTypeCountDescription

Structure tree

Visual key-by-key breakdown

What is a JSON counter?

JSON (JavaScript Object Notation) is a popular format used by websites and apps to store and transfer data — think of it as a structured list of information. A JSON counter is a free online tool that reads that data and instantly tells you how many items, records, keys, and nested sections it contains — without you needing to count anything manually or write a single line of code. Simply paste your JSON into the input box, or enter a live API URL and click fetch — the tool immediately breaks down your data at every level, showing you the total count at the top, plus a full breakdown of every array, object, and nested layer inside. It works entirely in your browser, so your data stays private and nothing is sent to any server.

Top-level count

the main record total

Most important

This is the headline number — how many items sit at the very first layer of your JSON. If your JSON is a list of users, this tells you how many users there are in total. If it is a single object, it tells you how many top-level keys it has. Think of it as the answer to "how much data do I have?"

Example
[ {"id": 1, "name": "Ali"}, {"id": 2, "name": "Sara"}, {"id": 3, "name": "Ahmed"} ]
Top-level count: 3 records — 3 user objects in the array

Array count

how many lists exist in your JSON

An array is a list of items written inside square brackets [ ]. The array count tells you how many of these lists exist across your entire JSON — including ones buried deep inside other objects. This is useful when your data has multiple lists at different levels, such as a list of orders where each order also contains a list of items.

Example
{ "orders": [ ← array 1 {"items": ["pen","book"]}, ← array 2 {"items": ["laptop"]} ← array 3 ] }
Array count: 3 arrays — 1 orders list + 2 items lists

Object count

how many data records exist

An object is a single record written inside curly braces { } that holds a set of named fields. The object count tells you how many of these records exist anywhere in your JSON. Each user profile, each order, each product — if it sits inside curly braces, it counts as one object. This is the best way to understand how many individual "things" your data describes.

Example
[ {"name":"Ali","city":"Karachi"}, ← object 1 {"name":"Sara","city":"Lahore"}, ← object 2 {"name":"Ahmed","city":"Multan"} ← object 3 ]
Object count: 3 objects — 3 individual records

Key count

total number of named fields

A key is the label or name for a piece of data — like "name", "email", or "price". The key count adds up every single named field across all objects in your JSON. If you have 100 users each with 5 fields, your key count is 500. This helps you understand the total volume of information stored, not just the number of records.

Example
{ "id": 1, ← key 1 "name": "Ali", ← key 2 "role": "admin" ← key 3 }
Key count: 3 keys — id, name, role

String count

text values in your data

A string is any piece of text enclosed in quotation marks — like a name, email address, city, or status label. The string count tells you how many text values appear anywhere across your JSON. Useful for understanding how much of your data is descriptive text versus numbers or flags.

Example
{"name": "Ali", "city": "Karachi", "age": 28, "active": true}
String count: 2 strings "Ali" and "Karachi"

Number count

numeric values in your data

A number value is any integer or decimal not wrapped in quotes — like an ID, price, age, or score. The number count totals all numeric values found across your entire JSON. This quickly shows how much of your data is quantitative, which matters when planning how to process or display it.

Example
{"id": 1, "name": "Sara", "age": 27, "score": 94.5}
Number count: 3 numbers 1, 27, and 94.5

Nested JSON count

items inside items inside items

Most complex

Nested JSON means data that lives inside other data — like a user object that contains an address object, which itself contains a city and postcode. The nested count shows how many items exist at each depth level (Level 0, Level 1, Level 2, and so on). This is the most powerful feature of the tool — it lets you see the full shape of your data, not just the surface.

Example — 3 levels deep
{ ← Level 0 (1 object) "user": { ← Level 1 (1 object) "address": { ← Level 2 (1 object) "city": "Karachi" ← Level 2 value } } }
Nesting depth: Level 0 Level 1 Level 2

Max depth

how deeply nested your data goes

Max depth is a single number that tells you how many layers deep your JSON goes at its deepest point. A flat list of users might have a depth of 1. A complex API response with nested orders, items, and metadata might reach depth 4 or 5. A higher depth means your data is more complex and requires more careful handling when reading or processing it.

Depth scale
0–1Simple flat list — easy to read and loop through
2–3Typical API response — moderate complexity
4+Deeply nested — may need recursive processing

API URL fetch

analyse live data without copy-pasting

Instead of manually copying JSON from an API, you can paste the API's web address (URL) directly into the tool and click Fetch. The tool retrieves the live response and runs the full count analysis on it instantly. This is ideal for developers checking how many records an endpoint returns, or for verifying that an API is sending the correct amount of data.

How to use it
1Switch to the "Hit API URL" tab in the tool
2Paste your API URL into the input field
3Click Fetch — results appear automatically

Read more about Json on Wikipedia.

Read about Privacy Policy of jsoncount.com

xml to json converter xml to json