JSON entity normalizer
Paste nested JSON and a schema to extract authors, comments, products or any other nested records into `entities` tables keyed by id.
About this tool
JSON normalization turns a nested document into lookup tables keyed by id. Instead of keeping the same user object repeated inside every post and comment, the output stores one entities.users["1"] record and replaces each nested occurrence with the id "1". This is the same shape many Redux, cache, and ETL pipelines expect: { "entities": { ... }, "result": ... }.
Describe the relationships with a compact schema. JSON form uses entity names as keys, for example {"articles":{"author":"users","comments":["comments"]},"comments":{"commenter":"users"},"users":{}}. Shorthand form is easier to type: articles: author -> users, comments -> [comments]. Fields not named in the schema stay on their original entity.
Worked example: paste a post whose author is { "id": "1", "name": "Paul" }, set root to articles, and use schema articles: author -> users. The post is stored in entities.articles, the author is stored in entities.users, and the article's author field becomes just "1".
Limits and edge cases: the JSON document is capped at 5 MB, schemas are capped at 100 KB, nesting is capped at 100 levels, and at most 200,000 extracted entities are kept. The tool is schema-guided and deterministic; it does not run JavaScript callbacks, infer arbitrary polymorphic unions, or denormalize an entity store back into a tree.
FAQ
Is this the same as flattening JSON into dotted keys?
No. Dotted-key flattening rewrites { "a": { "b": 1 } } into something like { "a.b": 1 }. Entity normalization extracts nested records into tables keyed by id and replaces nested objects with references, so repeated records are stored once.
How do I describe arrays of nested entities?
Use a one-element array in JSON schema form, such as "comments": ["comments"], or brackets in shorthand form, such as comments -> [comments]. A single object in a list field becomes a one-element reference list so messy payloads still normalize.
What happens when an entity has no id?
The default is error so missing ids do not silently corrupt the store. You can choose index for run-local ids like users-1, hash for content-based ids, or keep to leave that nested object inline instead of extracting it.
Can I use custom id fields like `_id` or `id_str`?
Yes. Set id_field to a single field, a comma-separated fallback list such as id,_id,uuid, or a JSON map like { "*": "id", "tweets": "id_str" } for per-entity rules.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool json-normalize '{"id":"123","title":"My first post!","author":{"id":"1","name":"Paul"},"comments":[{"id":"324","commenter":{"id":"2","name":"Nicole"}}]}' 'schema=articles: author -> users, comments -> [comments]
comments: commenter -> users
users:' 'root=articles'New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/json-normalize/?json=%7B%22id%22%3A%22123%22%2C%22title%22%3A%22My%20first%20post%21%22%2C%22author%22%3A%7B%22id%22%3A%221%22%2C%22name%22%3A%22Paul%22%7D%2C%22comments%22%3A%5B%7B%22id%22%3A%22324%22%2C%22commenter%22%3A%7B%22id%22%3A%222%22%2C%22name%22%3A%22Nicole%22%7D%7D%5D%7D&schema=articles%3A%20author%20-%3E%20users%2C%20comments%20-%3E%20%5Bcomments%5D%0Acomments%3A%20commenter%20-%3E%20users%0Ausers%3A&root=articles&path=data.items&id_field=id%2C_id%2Cuuid&on_missing_id=error&on_conflict=merge&output=normalized&pretty=true&indent=2Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
