JSON Tools

Flatten JSON Arrays

Flatten nested arrays within JSON data by reducing array depth. Target all arrays, top-level only, or specific paths. Features include max depth control, duplicate removal, and structure preservation options.

Updated 2025-06-12

Flatten JSON Arrays

Recursively flatten nested arrays within JSON structures. Reduce array depth, target specific paths, or flatten all arrays at once.

Arrays found:
+1 more

Flatten Options

About Flatten JSON Arrays

This tool flattens nested arrays within JSON data. Unlike the "Flatten JSON Object" tool which converts nested objects to dot notation, this tool specifically targets arrays within arrays, reducing their depth.

Flatten Modes:

  • All arrays (recursive): Flattens every nested array throughout the entire JSON structure
  • Top-level arrays only: Only flattens arrays that are direct children of objects
  • Specific path: Target a specific array by its JSON path (e.g., "data.items")

Example:

// Input:
[[1, 2], [3, [4, 5]], 6]

// Output (fully flattened):
[1, 2, 3, 4, 5, 6]

Related tools

Flatten JSON Arrays | JSON Tools