Simple online tools for developers, networking, text and conversions.

Developer Tools

JSON Flatten

Flatten nested JSON into a single-level object with dot notation paths.

Tool

Use this JSON Flatten tool to convert nested JSON into a flat object where each key represents a full path. It is useful for exports, analytics prep, debugging nested payloads, quick mapping work, documentation, and turning complex objects into a simpler shape for inspection or transformation. Arrays are represented with indexed paths so you can still see where values came from.

About this tool

Use this JSON Flatten tool to convert nested JSON into a flat object where each key represents a full path. It is useful for exports, analytics prep, debugging nested payloads, quick mapping work, documentation, and turning complex objects into a simpler shape for inspection or transformation. Arrays are represented with indexed paths so you can still see where values came from.

Use json flatten when you need a fast browser-based result without extra setup. It works well for quick checks, one-off tasks, and routine formatting or calculation work.

Learn more

Why use this tool

How to use

  1. Paste a valid JSON object or array into the input box
  2. Click Run Tool to flatten the structure
  3. Review the output object with dot and index notation keys
  4. Copy the flat result for mapping, docs, or analysis
  5. If needed, use JSON Key Extractor to inspect only the path list

Examples

Example

Input

{"user":{"id":7,"profile":{"email":"a@example.com"}}}

Output

{
  "user.id": 7,
  "user.profile.email": "a@example.com"
}

Useful when nested values need to be reviewed as simple path-value pairs.

Example

Input

{"orders":[{"id":101},{"id":102}]}

Output

{
  "orders[0].id": 101,
  "orders[1].id": 102
}

Useful when array content must stay traceable after flattening.

Common errors

The input JSON is invalid

Fix: Validate or format the payload before flattening it.

The user expects the result to preserve nested objects

Fix: Flattening converts nested structure into path-based keys, so use JSON Formatter if you want the original shape.

Arrays are expected to stay as plain arrays

Fix: This tool uses indexed paths like items[0].name so each nested value remains traceable.

The user expects reverse unflatten support

Fix: This page only flattens JSON. Reverse expansion would be a separate tool.

The output is used where original nested JSON is required

Fix: Use the flattened result for analysis or mapping, not where the original schema must stay nested.

FAQ

What does JSON Flatten do?

It converts nested JSON into a flat object where each key represents the full path to a value.

How are arrays represented?

Arrays use indexed paths such as orders[0].id.

Does flattening remove the original values?

No. It keeps the values but changes how they are represented.

What is the difference between JSON Flatten and JSON Key Extractor?

Flatten returns path-value pairs, while Key Extractor mainly returns the path list without restructuring the values into a flat object.

When is flattening useful?

It is useful when nested JSON is too deep to scan easily and you want a simpler path-based view.

Use cases

Related tools