What’s the difference between flat and nested JSON localization formats?

JSON localization files can be organized in flat or nested formats, and choosing the right structure affects readability, maintainability, and integration with your app.

Flat JSON #️⃣

  • All translation keys are at the top level, usually with dot-separated paths representing hierarchy:
{
  "home.title": "Welcome",
  "home.description": "Your productivity hub",
  "buttons.save": "Save",
  "buttons.cancel": "Cancel"
}
  • Advantages: easy to search and reference keys programmatically; simpler for some i18n frameworks.
  • Drawbacks: less visually organized, harder to group related strings for translators.

Nested JSON #️⃣

  • Keys are organized hierarchically using objects, reflecting the app’s structure:
{
  "home": {
    "title": "Welcome",
    "description": "Your productivity hub"
  },
  "buttons": {
    "save": "Save",
    "cancel": "Cancel"
  }
}
  • Advantages: visually clear, groups related content logically, easier for translators to understand context.
  • Drawbacks: some frameworks or automation scripts may require flattening before use.

Localazy supports both flat and nested JSON formats, allowing you to upload, translate, and export files without losing structure. You can also choose the preferred format for your project, ensuring consistency across environments and repositories.

Was this article helpful?

Please help us with improving our documentation.
We appreciate all your feedback.

Category

Last updated

27/10/2025