DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
HomeJSONJSON Flatten / Unflatten

About JSON Flatten / Unflatten

JSON Flatten / Unflatten preview - JSON tool

Flatten nested JSON to dot-notation or unflatten back. Part of the DevTools Surf developer suite. Browse more tools in the JSON collection.

Use Cases

  • Explore deeply nested API responses by listing all paths
  • Convert nested configs to flat environment variable format
  • Generate documentation of all fields in a JSON schema
  • Prepare hierarchical data for flat-file or CSV export

Tips

  • Flatten deep JSON to dot-notation for quick scanning
  • Unflatten dot-notation paths back to nested structure
  • Use the flattened output as a key list for documentation

Fun Facts

  • Dot-notation for nested objects originated in JavaScript property access syntax defined in the ECMAScript 1 specification in 1997.
  • MongoDB uses dot-notation in queries to access nested document fields, making flattened keys directly usable as Mongo query paths.
  • Flattening a 10-level deep JSON object can reveal hundreds of leaf paths, making it invaluable for understanding complex API responses.

FAQ

What does flattening do to nested JSON?
Every leaf value becomes a key in a single flat object, with the path encoded as dot-separated keys (`user.address.city`). Arrays use bracket indexes (`items[0].id`).
Why would I flatten JSON?
CSV export, feature engineering for ML, comparing nested configs as a list, and loading into column-stores that don't handle nested types natively.
Can I reverse the flatten?
Yes — the same tool unflattens. Paste dot-notation keys and values and it rebuilds the nested object/array structure.
What about keys that contain dots?
By default dots in original keys are preserved in the flattened output and the tool uses a configurable separator ('.', '/', '__') so you can avoid collisions.

Related JSON Tools

JSON FormatterJSON ValidatorJSON ViewerJSON StringifyJSON PatchJSON DiffJSONPath TesterJSON Sort Keys
New · Flagshipsimple REST client

REST Handler — Collections, env vars, history, cURL converter

Send requests, save collections (nested), swap environments, and convert between cURL / Collection JSON / REST Handler YAML.

Open

Popular tools

The most-used tools on DevToolsSurf, one click away.

Encoding & crypto

  • Base64 Encode
  • Base64 Decode
  • URL Encoder
  • URL Decoder
  • Hash Generator
  • JWT Decoder
  • JWT Encoder
  • UUID Generator
  • ULID Generator
  • Password Generator
  • Bcrypt Hash Tester

Converters

  • CSV to JSON
  • JSON to CSV
  • XML to JSON
  • JSON to XML
  • HTML → Markdown
  • HTML → React JSX
  • cURL to Code
  • Collection JSON → cURL
  • Swagger to Collection JSON
  • JSON → Go Struct
  • JSON → TypeScript Types

JSON & YAML

  • JSON Formatter
  • JSON Validator
  • JSON Viewer
  • JSON Minifier
  • JSON Diff
  • JSONPath Tester
  • YAML Formatter
  • YAML to JSON
  • JSON to YAML

Text & regex

  • Regex Tester
  • Text Diff
  • Case Converter
  • Word Counter
  • Markdown Preview
  • Slug Generator
  • Lorem Ipsum Generator
  • Markdown → PDF

CSS & color

  • CSS Beautifier
  • Minify CSS
  • Color Converter
  • Gradient Generator
  • Contrast Checker
  • Color Palette Generator
  • Flexbox Playground
  • Tailwind → CSS

Generators

  • QR Code Generator
  • Mock Data Generator
  • Favicon Generator
  • .gitignore Builder
  • README.md Generator
  • Dockerfile Generator
  • Sitemap Generator

API & networking

  • REST Handler
  • HTTP Header Analyzer
  • IP Address Lookup
  • CIDR Calculator
  • User-Agent Parser
  • HTTP Status Reference
  • OpenAPI Viewer

Date & time

  • Timestamp Converter
  • Timezone Converter
  • Cron Expression Parser
  • Duration Calculator
  • Age Calculator
  • Date Format Converter

Images

  • Image Converter
  • Image Resizer (Batch)
  • SVG Optimizer
  • Base64 ↔ Image
  • WebP ↔ AVIF Converter
  • Image Compressor

PDF tools

  • PDF Merger
  • PDF Splitter
  • PDF Compressor
  • Markdown → PDF
  • EPUB → PDF
  • MOBI / AZW → PDF
  • DOCX → PDF
  • HTML → PDF

Resources

  • Community feed
  • Themes marketplace
  • Pricing & credits
  • Privacy policy
  • Terms of service
  • Sitemap
  • robots.txt

Your account

  • Sign in
  • Dashboard
  • Run history
  • My profile
  • Settings
DevTools Surf logo
DevTools Surf919+ tools

Fast · privacy-first · client-side · © 2026

Home·Feed·ThemesPricing·Sign inPrivacy·Sitemap Feedback