JSON Flattener

Flatten nested JSON to single-level dot-notation keys in your browser. Ideal for CSV prep, diffing, and key inventories. Free, no upload.

JSON inputpaste, type, or drop a file
JSON output
Runs 100% in your browser. Nothing is uploaded, logged, or stored, and there are no ads. Verify it yourself: open your browser's Network tab while you convert and watch that no requests leave this page.

About this tool

Flatten deeply nested JSON into a single-level object with dot-notation keys: {"user": {"address": {"city": "Oslo"}}} becomes {"user.address.city": "Oslo"}. Arrays of objects are flattened per element.

Flat JSON is easier to diff, easier to inventory (every leaf key is visible at once), and maps directly onto tabular formats.

Common uses

  • Produce a complete inventory of every leaf key in a complex payload.
  • Prepare nested API data for spreadsheet or SQL import.
  • Diff two configurations at the individual-setting level.

Automate via API

The same conversion is available as a REST endpoint for scripts, pipelines, and backends:

curl -X POST https://payloadly.com/api/v1/tools/json-flattener \
  -H "Content-Type: text/plain" \
  -H "X-Api-Key: YOUR_API_KEY" \
  --data-binary @input.json

API documentation · Get an API key

Worked examples

Real payloads from tools people use daily, with the exact output this converter produces. Every example runs in your browser, so you can load one and adapt it to your own data.

Flatten a Notion API page object

Notion page objects nest properties several levels deep; flattening surfaces every leaf as a single dot-notation key.

JSON input
{
  "id": "a1b2",
  "properties": {
    "Name": { "title": [{ "plain_text": "Launch plan" }] },
    "Status": { "select": { "name": "In progress" } }
  }
}
JSON output
{
  "id": "a1b2",
  "properties.Name.title": "[{\"plain_text\":\"Launch plan\"}]",
  "properties.Status.select.name": "In progress"
}

Flatten a Stripe event payload

Flattening a Stripe event lists every field path at once, which makes it easy to see what lives under data.object.

JSON input
{
  "id": "evt_1PabcXYZ",
  "type": "charge.succeeded",
  "data": {
    "object": { "id": "ch_3PabcXYZ", "amount": 2000, "currency": "usd", "status": "succeeded" }
  }
}
JSON output
{
  "id": "evt_1PabcXYZ",
  "type": "charge.succeeded",
  "data.object.id": "ch_3PabcXYZ",
  "data.object.amount": 2000,
  "data.object.currency": "usd",
  "data.object.status": "succeeded"
}

JSON notes

JSON (JavaScript Object Notation) is the standard interchange format for web APIs, config files, and log pipelines. It is strict: keys must be double-quoted, trailing commas are invalid, and comments are not allowed.

  • JSON does not support comments; they are stripped or rejected by parsers.
  • Trailing commas after the last element are invalid JSON.
  • Integers beyond 2^53 lose precision in JavaScript-based parsers.

Frequently asked questions

Is my data uploaded to a server?

No. This tool runs entirely in your browser using JavaScript, and there are no ads on the page. Nothing you paste or drop here is uploaded, logged, or stored, and you can verify that yourself: open your browser's developer tools and watch the Network tab while you convert (no requests leave the page), or disconnect from the internet after the page loads and keep working.

How are arrays flattened?

A top-level array of objects is flattened element by element (one flat object per row). Arrays nested inside an object are kept as JSON strings under their flattened key, so no elements are lost.

Is there a size limit or a fee?

The browser tool is free with no signup and comfortably handles files up to tens of megabytes (limited by your device's memory). For automated or bulk processing inside your own scripts and pipelines, use the paid REST API.

Related tools