JSON Translation
Source Language: en-US (English, United States)
The code of the source language. Example: fr, fr-FR, fil, zh-Hans-CN. Type to search.
Target Language: zh-Hans-CN (Chinese, Simplified Chinese, China)
The code of the target language. Example: en, en-US, fil, zh-Hans-CN. Type to search.
Generate plural forms:
Translate Metadata:
Generate & Save Glossary:
Translate only new strings:
AI translation takes time (up to 5 minutes) as the AI processes your content. This JSON Translation page translates in real-time and does not store your JSON or translations on our servers. For large content, we recommend using the I18N File Translation page for more reliable delivery. Please do not leave this page until translation is complete.

How to translate JSON

Translating JSON with our service is simple and efficient. Follow the steps below to translate while ensuring accuracy and maintaining the integrity of your JSON structure.

  1. Paste Your JSON: In the "Source Strings" section, paste your JSON content. Ensure the JSON is valid and properly formatted. Our service supports deeply nested JSON objects, preserving their structure during translation.
  2. Set Target Language: Input the target language (e.g., 'fr-FR') for translation.
  3. Start Translation: Click the "Translate" button to begin. Our service carefully processes the JSON structure, preserving keys and formatting while translating values.
  4. Copy or Save: After the translation is complete, you can either copy the translated JSON to your clipboard or save it as a file. The saved file will automatically use the target language code as its name, ensuring easy identification and organization.

What Is JSON and Why Is It Used for Localization?

JSON (JavaScript Object Notation) is a lightweight, human-readable data interchange format that organizes data as key-value pairs and nested objects. Originally designed for JavaScript data exchange, JSON is now a universal format supported natively by every major programming language, runtime, and browser.

JSON has become the dominant format for web and mobile app localization because of its simplicity, native browser support, and deep integration with the JavaScript ecosystem. Libraries like i18next, React Intl, ngx-translate, Vue i18n, and next-i18next all use JSON as their primary or default translation file format.

A JSON localization file stores strings as nested key-value pairs, where keys serve as identifiers referenced in code and values contain the human-readable text displayed to users in a specific language.

JSON i18n File Structure

A well-structured JSON localization file organizes strings hierarchically using nested objects. Here is a typical example:

{
  "greeting": "Hello, World!",
  "user": {
    "name": "John Doe",
    "welcome": "Welcome back, {{name}}!"
  },
  "nav": {
    "home": "Home",
    "about": "About Us",
    "contact": "Contact"
  }
}
  • String keys — human-readable identifiers that reference the translation in code (e.g., t('nav.home')). Keys are never translated; only string values are.
  • Nested objects — grouping related strings under a shared namespace (e.g., auth, errors) keeps large files organized and easy to maintain across teams.
  • Interpolation placeholders — variables like {{name}} or {{count}} are embedded in string values. Our AI detects and preserves all placeholder formats during translation.
  • Plural form keys — i18next uses special key suffixes (_one, _other, _few, _many) to handle language-specific pluralization rules. Our service recognizes these patterns and generates the correct forms for each target language.
  • Inline HTML and special characters — strings may contain inline HTML tags or escaped characters. Our AI preserves all markup and escaping exactly as in the source file.

JSON Localization File Example (i18next)

Here is a real-world i18next-compatible JSON localization file showing namespacing, interpolation, and plural form keys:

{
  "app": {
    "title": "My Application",
    "description": "A powerful tool for your workflow"
  },
  "auth": {
    "login": "Log in",
    "logout": "Log out",
    "welcome": "Welcome, {{name}}!",
    "itemCount_one": "{{count}} item",
    "itemCount_other": "{{count}} items"
  },
  "errors": {
    "notFound": "Page not found",
    "serverError": "Something went wrong. Please try again."
  }
}

This structure is directly compatible with i18next, React Intl, next-i18next, and ngx-translate. The same file can be used as the source for translating into French, German, Japanese, or any other target language using our service.

JSON in Modern i18n Workflows

JSON localization files are the foundation of most modern internationalization (i18n) workflows. The format's flexibility supports both simple flat key-value structures for small projects and deeply nested, namespaced hierarchies for enterprise-scale applications with hundreds of translation keys.

Because JSON files are plain text, they integrate naturally with version control systems like Git, CI/CD pipelines, and translation management platforms. Teams can automate the entire localization pipeline — from extracting new strings to deploying translated builds — using the L10n.dev REST API.

Frameworks and Libraries Using JSON for Localization

JSON translation files are supported by virtually every major web and mobile framework:

  • i18next / react-i18next — the most widely used JavaScript i18n library. Uses JSON files organized by language and namespace (e.g., public/locales/en/common.json). Supports interpolation, plurals, context, and nesting out of the box.
  • next-i18next — the standard i18n solution for Next.js applications. Built on i18next, it uses JSON files in the public/locales/ directory and supports server-side rendering with automatic locale detection.
  • Angular (ngx-translate) — the popular ngx-translate library loads JSON translation files and provides a translate pipe and service for Angular applications. Supports runtime language switching without reloading the app.
  • Vue i18n — the official Vue.js i18n plugin supports JSON message files. JSON is commonly preferred for programmatic generation and API-driven localization workflows in Vue 3 and Nuxt.js projects.
  • Flutter / Dart (ARB) — Flutter's intl package uses ARB files (Application Resource Bundle), which are JSON files with localization metadata. The flutter gen-l10n command compiles them into strongly-typed Dart code.
  • React Native — React Native apps use react-i18next or i18n-js with JSON translation files for cross-platform iOS and Android localization from a single shared resource.

AI Glossary Generation for JSON Translations

Our AI Glossary Generation feature helps you maintain consistent terminology across all your JSON localization files. Enable saving and reusing it by toggling Generate & Save Glossary in the translation options:

  • Consistent terminology — the AI analyzes your source JSON and existing target translations to build a glossary of key terms, ensuring product names, UI labels, and technical terms are translated the same way throughout your app.
  • Domain-specific terms — provide a sample of already-translated JSON content in the target strings field. The AI learns your preferred terminology and applies it to new strings automatically.
  • How to use it — paste your translated JSON content into the optional target strings field that appears when glossary generation is enabled. The AI will extract recurring terms and use them as a translation guide. If no target strings are provided, the AI generates glossary entries from the source content alone, which can still improve consistency.

Why our JSON translation service

  • AI-powered contextual translation: Our advanced AI understands JSON structures, handles placeholders seamlessly, and adapts translations to cultural nuances for the target language.
  • i18next translation: Our service fully supports JSON files in the i18next format. It ensures accurate handling of plural forms, preserves HTML tags and line breaks, and maintains the integrity of your translations, making it ideal for localization workflows.
  • Locale-specific adjustments: Automatically converts numbers, dates, and other locale-sensitive data to match the target region's format.
  • Error handling: Detects and corrects AI translation errors, ensuring consistently high-quality results.
  • Cost-effective: Enjoy affordable pricing with 10,000 free characters monthly. View Pricing
  • Optimized for large JSON content: Efficiently process large JSON files by dividing them into manageable chunks, ensuring translation consistency with predefined terminology and context.

JSON Translation vs. Other Formats

JSON translation focuses on adapting key-value pairs for a specific language and region while preserving the structure. Our service ensures that the translated JSON remains valid and ready for use in your applications.

Our service focuses on translating JSON files using AI-powered translation, ensuring accuracy and efficiency while managing JSON file structure.

Common JSON Localization Use Cases

JSON translation files are used across a wide range of project types and development workflows:

  • React and Next.js applications — translate public/locales/en/common.json and other namespace files for React SPAs and Next.js apps using react-i18next or next-i18next.
  • Angular applications — translate ngx-translate JSON files to add multi-language support to Angular enterprise dashboards and single-page applications.
  • Vue.js / Nuxt.js applications — localize Vue i18n JSON message files for Vue 3 single-page apps and Nuxt.js server-rendered sites.
  • React Native apps — translate JSON localization files for cross-platform iOS and Android mobile applications built with React Native and react-i18next.
  • Desktop apps (Electron) — Electron applications use JSON localization files with i18next or custom loaders to deliver multi-language desktop software.
  • CI/CD and automated pipelines — integrate JSON translation into your release workflow using the L10n.dev REST API to automate localization as part of your CI/CD pipeline.
  • Headless CMS and static sites — translate JSON content exports from headless CMS platforms like Contentful, Sanity, or Strapi for multi-language static sites built with Gatsby, Next.js, or Astro.

Important: Working with Arrays in JSON

When using "Translate Only New Strings": If your JSON contains arrays (not just objects), make sure the array indexes in your target file match those in the source file. This ensures translations remain consistent. When adding new strings, always append them to the end of the array.

Example:

// ✅ CORRECT: New items added at the end
// source.json
["Apple", "Banana", "Orange"]

// target.json (existing)
["Manzana", "Plátano"]

// After translation (new item appended)
["Manzana", "Plátano", "Naranja"]
// ❌ INCORRECT: Items inserted in the middle
// This will cause misalignment!
["Apple", "Cherry", "Banana", "Orange"]

For object-based JSON structures (recommended for i18n), this is not a concern as translations are matched by key names.

Frequently Asked Questions

What is preserved during JSON translation?

All JSON keys, structural nesting, interpolation placeholders ({{variable}}, {variable}), inline HTML tags, escaped characters, and plural key suffixes are preserved. Only the human-readable string values are translated.

Will interpolation placeholders like {{name}} be kept intact?

Yes. Our AI automatically detects and preserves all common interpolation formats used by i18next ({{variable}}), React Intl ({variable}), Vue i18n ({variable}), and others. Placeholder names and syntax remain exactly as in the source file.

Does the service support deeply nested JSON structures?

Yes. Our service handles arbitrarily deep JSON nesting. Each string value is translated with awareness of its hierarchical path, and the output JSON maintains the exact same structure as the input file.

How are i18next plural forms handled?

Our AI recognizes i18next plural key suffixes (_one, _other, _zero, _few, _many) and generates the correct plural forms for the target language. Translating into a language like Polish or Arabic will automatically produce all required plural form entries.

What if my JSON file is very large?

For very large JSON files (hundreds of kilobytes), we recommend using the I18N File Translation page, which supports file uploads up to 5 MB, provides more reliable delivery for large content, and allows translating into multiple target languages at once.