Add Localization Wrapper (Free Online Tool)

Wrap string fields in localization objects while keeping the result as structured JSON

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Add localization fields to this JSON content.

{
"title": "Hello"
}
Output
1{
2 "title": {
3 "en": "Hello",
4 "fr": "",
5 "es": ""
6 }
7}

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • API responses
  • Nested JSON
  • Arrays & objects

Example: input → output

Input / Output
Input
{
"title": "Hello"
}
Output
{
"title": {
"en": "Hello",
"fr": "",
"es": ""
}
}
Advanced usage (optional)

Add Localization Wrapper

v1.0.0
Localization
objectreversible

Description

Add Localization Wrapper

Convert string fields into localized objects with support for multiple languages.

Description

This utility transforms string values into localization objects, preserving the original value as the base language and creating empty placeholders for additional languages.

Configuration

FieldTypeDefaultDescription
Fields to localizepath-pickerrequiredSelect which fields to convert to localized format
Base Languagelanguage-selectenThe language code for the original value
Languagesmulti-language-select-Additional language codes to add as placeholders

How It Works

The utility performs these steps:

  1. Traverse - Walk through the entire JSON structure
  2. Match Path - Find the selected fields to localize
  3. Filter Type - Only process string values
  4. Wrap Value - Convert the string into an object
  5. Set Base Value - Set the original string under the base language key
  6. Set Placeholder Values - Create empty strings for each additional language

Examples

Basic Localization

Input:

{
  "title": "Hello"
}

Config:

targetPaths: [title]
baseLanguage: en
languages: [fr, es]

Output:

{
  "title": {
    "en": "Hello",
    "fr": "",
    "es": ""
  }
}

Multiple Fields

Input:

{
  "title": "Hello",
  "description": "A greeting",
  "count": 42
}

Config:

targetPaths: [title, description]
baseLanguage: en
languages: [fr]

Output:

{
  "title": {
    "en": "Hello",
    "fr": ""
  },
  "description": {
    "en": "A greeting",
    "fr": ""
  },
  "count": 42
}

Note: Non-string fields (like count) are left unchanged.

Configuration

NameTypeDefaultDescription
Fields to localizepath-picker(required)
Based languagelanguage-selecten
Multiple languagesmulti-language-select

Examples

AI Prompt
Add localization fields to this JSON content.
{
"title": "Hello"
}
Output
1{
2 "title": {
3 "en": "Hello",
4 "fr": "",
5 "es": ""
6 }
7}
Config
Fields to localize
title
Based language
en
Multiple languages
fr, es

API Usage

POST /api/v1/utilities/localization.add-wrapper
Example:
curl -X POST https://your-domain.com/api/v1/utilities/localization.add-wrapper \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":{"title":"Hello"}},"config":{"targetPaths":["title"],"baseLanguage":"en","languages":["fr","es"]}}'
Response
1{
2 "title": {
3 "en": "Hello",
4 "fr": "",
5 "es": ""
6 }
7}