JSON Forge
100% Client-Side: your data is never sent to a server

JSON examples

User Profile JSON Example

A typical response from a users endpoint: identifiers, a nested profile, preferences, roles and timestamps. All values are invented.

Loading editor…
Paste or type JSON on the left to explore it as a tree.
Empty🔒 Processed locally in your browser

The example

The JSON above is the example. Explore it in the Tree tab, press Download to save it as a .json file, or Share to send someone a link to it. All names, ids, emails and values are invented.

Fields explained

PathTypeNotes
idnumberA numeric identifier. Very large ids should be sent as strings.
emailstringexample.com is reserved for documentation, so it never belongs to a real person.
profile.bionullA field that exists but has no value yet.
rolesarray of stringsPermissions as a list of names.
preferences.notificationsobjectGrouped boolean settings.
createdAtstringISO 8601 UTC timestamp. JSON has no date type, so dates are strings.

Read it in code

JavaScript:

const user = await (await fetch("/api/users/1042")).json();
if (user.preferences.notifications.email) sendDigest(user.email);

Python:

user = requests.get(url).json()
if user["preferences"]["notifications"]["email"]:
    send_digest(user["email"])

What this example is good for

Tips

Convert this example

Open it in a converter, then switch the output in the Code tab:

More examples

All JSON examples · Cheat sheets