# JSON Flattener

> Flatten deeply nested JSON into dot-notation keys, or expand flat keys back into nested objects.

To flatten JSON, paste a nested object and every leaf value is rewritten with a dot-notation path key such as user.address.city. This makes deeply nested API responses easy to diff, search, load into a spreadsheet or feed into a translation file.

**URL:** https://convertto.tech/t/json-flattener
**Category:** Data & Format Tools (https://convertto.tech/c/data-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Enter or paste your json.
2. Choose the key separator.
3. Turn "Index into arrays" on or off as needed.
4. The result appears immediately — copy or download it.

## FAQ

### What is flattening for?

Getting nested JSON into anything that expects a flat table — a CSV, a spreadsheet, a database column set. A nested address object becomes address.city and address.postcode, which a table can hold and a nested object cannot.

## Related tools

- [JSON Formatter & Validator](https://convertto.tech/t/json-formatter): Format, validate, repair and analyse JSON — with errors that point at the exact line.
- [JSON to TypeScript Converter](https://convertto.tech/t/json-to-typescript): Generate TypeScript interfaces, Zod schemas, Go structs, Python dataclasses or Rust structs from JSON.
- [JSONPath Tester](https://convertto.tech/t/jsonpath-tester): Run JSONPath expressions against a document and see the matches instantly.
- [Query String to JSON Converter](https://convertto.tech/t/query-string-converter): Convert URL query strings to JSON and build query strings from JSON objects.
- [Data Format Converter](https://convertto.tech/t/data-format-converter): Convert between JSON, YAML, XML, CSV, TSV and TOML in any direction, locally in your browser.
- [.env to JSON Converter](https://convertto.tech/t/env-to-json): Convert .env files to JSON and back — for config migrations and CI variables.
- [CSV Column Extractor](https://convertto.tech/t/csv-column-extractor): Pull selected columns out of a CSV by name or position, and reorder them.
- [JSON Diff](https://convertto.tech/t/json-diff): Compare two JSON documents and see exactly which keys were added, removed or changed.
