Расплющиватель и Восстановщик JSON (Точечная нотация)
Гид
JSON Flattener & Unflattener
Convert nested JSON structures to flat dot-notation key-value pairs, or reverse the process to rebuild nested objects from flat keys. This bidirectional tool handles deeply nested objects, arrays with index notation, custom delimiters, and configurable depth limits — all client-side in your browser. Perfect for working with NoSQL databases, environment variable configs, or any system that requires flat key-value formats.
Как использовать
Paste your JSON into the input area and select the operation mode — Flatten to convert nested JSON into dot-notation, or Unflatten to rebuild nested structures from flat keys. Choose your preferred delimiter (dot, slash, underscore, or custom), select how arrays should be notated, and set an optional depth limit. The output updates automatically with syntax highlighting, ready to copy or download.
Возможности
- Двустороннее преобразование – Flatten nested JSON to dot-notation or unflatten flat keys back to nested structures
- Custom Delimiters – Use dot (
.), slash (/), underscore (_), or any custom separator for key paths - Array Notation Options – Choose between dot-index (
arr.0.name) or bracket notation (arr[0].name) - Depth Limiting – Flatten only N levels deep, keeping deeper structures as nested values
- Auto-Detect Mode – Automatically suggests flatten or unflatten based on your input structure
- Type Preservation – Correctly preserves numbers, booleans, null values, and strings through round-trips
- Красивая печать вывода – Configurable indentation (2 or 4 spaces, or compact) with syntax highlighting
Часто задаваемые вопросы
-
What is JSON flattening and when is it useful?
JSON flattening converts a nested object structure into a single-level object where each key represents the full path to a value using dot notation. For example, a nested user.name.first path becomes a single flat key. This is useful when working with NoSQL databases like Redis or DynamoDB that store flat key-value pairs, when mapping nested configs to environment variables, or when you need to compare two deeply nested objects field by field.
-
How are arrays handled during flattening?
Arrays are flattened using numeric indices in the key path. With dot-index notation, array elements get keys like items.0 and items.1. With bracket notation, they become items[0] and items[1]. When unflattening, the tool detects numeric path segments and correctly reconstructs arrays rather than creating objects with numeric string keys.
-
What does the depth limit do?
The depth limit controls how many levels deep the flattener will recurse. With a depth limit of 2, deeply nested objects are only partially flattened, preserving nested structures beyond that level. Setting depth to 0 means unlimited flattening. This is useful when you want to partially flatten a structure while preserving some nested grouping.
-
Can flattening and unflattening round-trip without data loss?
Yes, as long as you use the same delimiter and array notation settings for both operations. Flattening followed by unflattening with matching settings will reproduce the original nested structure with all data types preserved — strings, numbers, booleans, null values, arrays, and nested objects all survive the round trip. The only caveat is that empty objects and empty arrays may be lost since they contain no leaf values to flatten.
Установите наши расширения
Добавьте инструменты ввода-вывода в свой любимый браузер для мгновенного доступа и более быстрого поиска
恵 Табло результатов прибыло!
Табло результатов — это интересный способ следить за вашими играми, все данные хранятся в вашем браузере. Скоро появятся новые функции!
Подписаться на новости
все Новые поступления
всеОбновлять: Наш последний инструмент был добавлен на **апрель** 16, 2026
