Group a JSON Array

Group a JSON Array by any object key to reorganize your data instantly. See grouped output live, copy or export it in one click.

Paste your input above or import a file below.
No file chosen
Supported file types: .txt, .csv, .tsv, .log, .json, .xml, .md, .ini, .yaml, .yml, .html, .htm, .css
Total groups: 0
Options

How to Use:

Paste a JSON array of objects into the input box, or import a file using the “Choose File” button. In the “Group by key” field, enter the property you want to group items by like type, category, or status. The output box will instantly show the array grouped into key-based buckets. You can shuffle the grouping key, try again, or reset it all with “Clear All.” Character count updates live. Use “Copy Output” to grab the result or “Export to File” to save it.

What Group a JSON Array can do:

Group a JSON Array helps you quickly regroup a flat array of objects into structured collections based on a shared key. If your items all have a type, tag, or label, this tool will reorganize them into a neat JSON object with arrays under each group. It’s ideal for converting raw data into something organized, reusable, or display-ready. All processing happens locally in your browser.

Example:

Input:

[
{ "type": "fruit", "item": "apple" },
{ "type": "fruit", "item": "banana" },
{ "type": "vegetable", "item": "carrot" }
]

Group by key: type

Output:

{
"fruit": [
{ "type": "fruit", "item": "apple" },
{ "type": "fruit", "item": "banana" }
],
"vegetable": [
{ "type": "vegetable", "item": "carrot" }
]
}

Common Use Cases:

Group a JSON Array is great for developers, analysts, or content teams working with APIs, reports, or structured data. It helps convert linear lists into grouped JSON by category, tag, or label. Whether you’re visualizing chart data or feeding grouped content into components, this tool makes it quick and clean.

Useful Tools & Suggestions:

To prep before grouping, Tokenize JSON can be used to break everything into parts you can actually manage. After it’s grouped, Convert JSON to YAML helps shift the structure into something more readable if you’re working across formats.