PDFFlare

JSON Flatten / Unflatten — Free Online

Flatten nested JSON to dot-notation keys, or rebuild a flat object back into nested JSON. Bi-directional, free, browser-based.

Flatten nested JSON into a single-level object with dot-notation keys, or rebuild a flat dot-keyed object back into nested JSON. Bi-directional, browser-based, and round-trip lossless for typical payloads.

Need to inspect the result before flattening? Use JSON Formatter. Want to query specific paths instead? JSONPath Tester extracts values without flattening.

Input:0 lines · 0 BOutput:empty

How to Flatten / Unflatten JSON

  1. Pick a direction

    Flatten turns nested JSON into a single-level object with dot-notation keys; Unflatten does the reverse.

  2. Paste your JSON

    Paste a nested JSON for flatten, or a flat dot-keyed object for unflatten.

  3. Convert and copy

    Click Convert, then copy the result or use ⇄ Swap to keep working on the output.

When Do You Need to Flatten JSON?

Form libraries: React Hook Form, Formik, and similar libraries use flat key paths for form state. Flattening lets you load nested API data straight into a form.

Translation files: Many i18n libraries (next-intl, react-intl) use dot-notation keys. Flattening converts a nested locale tree into the right shape for useTranslation('user.address.city').

Env-var configs: 12-factor apps, Helm charts, and Kubernetes ConfigMaps store configuration as flat key-value pairs. Flatten a structured config to seed those.

Spreadsheets: Round-trip nested data through CSV by flattening first — every path becomes a column header.

Why Use PDFFlare for JSON Flatten?

Lossless Round-Trip

Flatten then Unflatten reconstructs the original JSON structure exactly — arrays preserve index order, object keys preserve insertion order.

Bi-Directional

One tool, both directions. Flip with a dropdown or use ⇄ Swap to feed the output back as input.

100% Browser-Based

Your data never leaves your device. Safe for production payloads or sensitive configs.

No Signup Required

Open the tool, paste, click. No account, no rate limits.

Frequently Asked Questions About JSON Flatten