Free online JSON flattener. One-click to flatten nested JSON into dot-separated key-value pairs, or restore flattened JSON back to nested structure. Supports custom separators (dot, underscore, slash, etc.) for data processing and API debugging.
TL;DR: Flatten nested JSON into key-value pairs or restore flattened JSON back to nested structure, with custom separator support for data processing and debugging.
This tool runs entirely in your browser. Open DevTools → Network panel and search your input — it appears in no request.
FAQ
JSON flattening is the process of converting a nested JSON structure into single-level key-value pairs. Nested keys are joined by a separator (usually a dot), e.g., {"a":{"b":1}} becomes {"a.b": 1}.
Flattened JSON is useful in many scenarios: data export to CSV/Excel, configuration management, log analysis, API parameter processing, database storage, key path searching, etc. It simplifies access to deeply nested data.
Common separators like dot (.), underscore (_), slash (/), and hyphen (-) are supported. Arrays use bracket notation by default, e.g., items[0].name.
Yes. The tool supports bidirectional conversion — it can flatten nested JSON and also restore flattened JSON back to the original nested structure, including full restoration of arrays and objects.
Related Tools
Related Articles
Unexpected token '<' is not valid JSON — 5 Reasons Your API Returned HTML Instead
fetch throws SyntaxError: Unexpected token '<' when the response body is HTML, not JSON. Covers the 5 root causes: SPA history fallback returning index.html, auth 302 redirects, gateway 502 error pages, wrong baseURL, and missing res.ok checks — with curl diagnostics.
JSON Troubleshooting Handbook: From Error Message to Fix (Symptom Index)
JSON errors that make no sense? This handbook organizes fixes by symptom — syntax errors, Unicode escaping, encoding mojibake, and Schema validation failures, with a diagnostic tree and a general debugging workflow.
Excel to JSON: Dates Become Numbers / Chinese Garbled — Fix
When converting Excel to JSON, dates turn into numbers like 44927, Chinese is garbled, empty cells vanish? Explains Excel serial dates and encoding pitfalls, with our Excel to JSON tool.