Конвертация
Локально · нулевая загрузка

JSON Flatten / Unflatten

Dotted keys · Arrays as 0.1.2 · Local

Конвертация YAML

Готово

Исходный ввод

                                
                            
Вывод разбора

                                
Фиксированная высота, длинный код прокручивается внутри

ABOUT

About JSON Flatten / Unflatten

Turn nested objects and arrays into a single flat object whose keys are paths, then restore the tree. Default separator is a dot; underscore is optional.

The Query params tool still converts URL query strings. This page never emits a=1&b=2.

DEEP DIVE

JSON Flatten / Unflatten

Spreadsheets, Elasticsearch, and some log pipelines prefer flat maps. Developers still want the nested document for APIs.

Array indexes become numeric path segments: user.tags.0. Empty objects and arrays are kept when they have a path.

FEATURES

JSON Flatten / Unflatten

01

Flatten

Nested JSON → {"user.profile.age": 31}.

02

Unflatten

Dotted keys → nested objects and arrays.

03

Separator

Dot or underscore.

04

Local only

No upload.

05

Not Query convert

a=1&b=2 stays on the Query page.

06

Works after JSONL

Flatten each object from an NDJSON array.

HOW TO USE

How to use

  1. 1

    Paste nested JSON (or a flat object).

  2. 2

    Choose Flatten or Unflatten.

  3. 3

    Optionally switch the separator.

  4. 4

    Copy the result.

FAQ

FAQ

Is this the Query converter?

No. Query is for URL search strings. This page is a JSON object with path keys.

How are arrays encoded?

Numeric segments: items.0.name.

What if a key already contains a dot?

Treat keys as atomic only after split; avoid dots inside original keys or pick underscore.

Can I flatten a root array?

Yes. Keys start at 0, 1, 2.

Is data uploaded?

No.

Does CSV export stay on the CSV page?

Yes. This page does not build tables.

Скопировано в буфер обмена