Normalize JSON Records Online (Free & Fast)

Make every JSON record share the same shape — fill missing keys, drop extras, all in one pass.

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Normalize this JSON structure and fill missing keys with null.

[
{
"a": 1,
"b": 2
},
{
"a": 3,
"c": 4
},
{
"b": 5,
"c": 6
}
]
Output
1[
2 {
3 "a": 1,
4 "b": 2,
5 "c": null
6 },
7 {
8 "a": 3,
9 "b": null,
10 "c": 4
11 },
12 {
13 "a": null,
14 "b": 5,
15 "c": 6
16 }
17]

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • Mixed-shape arrays from multiple API endpoints
  • User-submitted JSON with optional fields
  • Pre-export normalization for analytics or CSV

Example: input → output

What is JSON normalization?

Input
[
  { "name": "Ada", "active": true },
  { "name": "Grace" }
]

Output
[
  { "name": "Ada", "active": true },
  { "name": "Grace", "active": null }
]

JSON normalization makes a collection of records share a consistent shape. If one record has name and email, another has name and phone, and a third has extra vendor fields, normalization fills missing keys, removes or preserves extras based on your settings, and orders fields consistently.

The goal is predictable data. CSV exporters, table renderers, schema validators, dashboards, and typed application code all behave better when every record has the same key set. Without normalization, shape drift often appears as a confusing error several steps downstream.

How to normalize JSON online

  1. Paste an array of JSON records into the input panel.
  2. Choose whether to infer the target shape or provide one explicitly.
  3. Pick defaults for missing fields, such as null, an empty string, or a custom literal.
  4. Decide what happens to extra fields: keep them, drop them, or move them aside.
  5. Run the tool and copy the normalized output.

When the input may not parse cleanly, start with the JSON Validator. When the records are deeply nested, use Flatten JSON before normalization if the downstream consumer expects flat columns.

When to use this tool

Use Normalize JSON when records describe the same thing but do not share the same fields: vendor exports, API arrays, form submissions, analytics events, and LLM-generated records. Normalize before JSON to CSV, schema validation, or diffing when column drift would hide the real issue.

Common use cases

  • Combine records from multiple vendors that use slightly different fields.
  • Prepare API responses before exporting with the JSON to CSV converter.
  • Clean user-submitted form responses before reporting.
  • Make LLM-generated JSON records consistent before validation or storage.
  • Stabilize datasets before using the JSON Diff tool to compare versions.

Normalize JSON vs clean JSON

Clean JSON removes noise: nulls, empty strings, casing differences, whitespace, or key-order problems. JSON normalization focuses on shape: every record should have the same keys and defaults.

Use cleaning when the data has messy values. Use normalization when the data has inconsistent fields. In many workflows, you normalize first to align the records, then clean the result so the final payload is both consistent and tidy.

Common errors when normalizing JSON

  • Wrong target shape - inferring from a small sample can miss fields that appear later.
  • Lossy extra-field handling - dropping extras is useful for strict exports, but risky when those fields may contain important data.
  • Ambiguous defaults - null, empty string, and 0 mean different things to different consumers. Pick the default your downstream system understands.
  • Mixed nested structures - nested objects with different shapes may need flattening before record-level normalization.

Why normalize before downstream tools

Normalization gives every later step a stable contract. Field extraction becomes predictable, CSV columns stop drifting, schema validation reports fewer accidental mismatches, and API or LLM pipelines can assume each record has the expected keys. It is the quiet preparation step that prevents noisy failures later.

Frequently asked questions

What does normalizing JSON mean?+

It enforces a consistent shape across an array of records. Missing fields get filled in with defaults, extra fields get removed (or moved aside), and key order can be made consistent across every record.

When should I normalize my JSON?+

Whenever you have an array of records that don't all share the same keys — common with multi-vendor APIs, partial dumps, merged datasets, or user-submitted data. Normalize before exporting to CSV, validating against a schema, or feeding records to a downstream tool that assumes uniform shape.

How does the tool decide the target shape?+

Two options: provide a static target schema (right when you have a known contract), or let the tool infer one from the union of all keys present (right for exploratory data).

What happens to extra fields not in the target schema?+

Configurable: drop them silently, keep them as-is, or move them to a metadata bucket. The default is 'drop' so the output strictly matches the target shape.

Can I use null vs empty string vs a custom default for missing fields?+

Yes. The fill-value is configurable per run. Pick null when downstream code distinguishes 'absent' from 'present-but-blank', empty string when feeding spreadsheet tools, or any literal you choose.

Common next steps

Advanced usage (optional)

Normalize

v1.0.0
Schema
arrayobjectdestructive

Description

Normalize

Ensure consistent structure across array items — fill missing keys, remove extra keys, sort keys, enforce type schemas, and require specific fields. Essential for preparing irregular data for tabular display or database insertion.

How It Works

The utility examines all items in an array, determines the superset (or intersection) of keys, and normalizes each item to have the same structure.

Fill Missing Keys

Items missing keys found in other items get those keys added with a configurable fill value.

Remove Extra Keys

Keep only keys that appear in every item (intersection). Removes keys that are unique to some items.

Type Schema Enforcement

Coerce field values to specified types. For example, ensure age is always a number even if some records have it as a string.

Required Fields

Specify fields that must exist in every item. Missing required fields are filled with the fill value.

Configuration

FieldTypeDefaultDescription
Target Pathspath-picker[]Select array paths to normalize (empty = normalize root array)
Fill Missing KeysbooleantrueAdd keys from other items that are missing in each item
Fill ValueenumnullValue for missing keys: null, empty-string, zero, or false
Remove Extra KeysbooleanfalseRemove keys not present in ALL items (keep only intersection)
Sort KeysbooleanfalseSort object keys alphabetically within each item
Type Schemajson{}Map of key → expected type for coercion (string, number, boolean)
Required Fieldsjson[]Array of keys that must be present in every item

Use Cases

Data Consistency

  • API responses: Normalize inconsistent API responses before processing
  • CSV preparation: Ensure all objects have the same keys before CSV export
  • Table display: Guarantee every row has the same columns for table rendering

Schema Enforcement

  • Type coercion: Fix string numbers ("30"30) across the dataset
  • Required fields: Ensure critical fields like id and name exist in every record
  • Key ordering: Sort keys alphabetically for consistent structure

Data Quality

  • Gap detection: Fill missing fields with null to make gaps visible
  • Intersection: Strip non-standard fields to keep only common structure
  • Import normalization: Standardize records from different sources before merging

Configuration

NameTypeDefaultDescription
Target Pathspath-picker[]Select array paths containing objects to normalize (empty = normalize root array)
Fill Missing KeysbooleantrueAdd keys from other items that are missing in each item
Fill ValueenumnullValue to use for missing keys when Fill Missing is enabled null empty-string zero false
Remove Extra KeysbooleanfalseRemove keys not present in ALL items (keep only the intersection)
Sort KeysbooleanfalseSort object keys alphabetically within each item
Type Schemajson{}Map of key → expected type for coercion (string, number, boolean). Example: {"age": "number", "active": "boolean"}
Required Fieldsjson[]Array of keys that must be present in every item. Missing keys are filled with the Fill Value. Example: ["id", "name"]

Examples

AI Prompt
Normalize this JSON structure and fill missing keys with null.
[
{
"a": 1,
"b": 2
},
{
"a": 3,
"c": 4
},
{
"b": 5,
"c": 6
}
]
Output
1[
2 {
3 "a": 1,
4 "b": 2,
5 "c": null
6 },
7 {
8 "a": 3,
9 "b": null,
10 "c": 4
11 },
12 {
13 "a": null,
14 "b": 5,
15 "c": 6
16 }
17]
Config
Target Paths
all
Fill Missing Keys
ON
Fill Value
null
Remove Extra Keys
OFF
Sort Keys
OFF

API Usage

POST /api/v1/utilities/schema.normalize
Example:
curl -X POST https://your-domain.com/api/v1/utilities/schema.normalize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":[{"a":1,"b":2},{"a":3,"c":4},{"b":5,"c":6}]},"config":{"targetPaths":[],"fillMissing":true,"fillValue":"null","removeExtra":false,"sortKeys":false}}'
Response
1[
2 {
3 "a": 1,
4 "b": 2,
5 "c": null
6 },
7 {
8 "a": 3,
9 "b": null,
10 "c": 4
11 },
12 {
13 "a": null,
14 "b": 5,
15 "c": 6
16 }
17]