Convert Translation String CSV to i18n JSON
This tool efficiently converts your localization CSV files into i18n JSON arrays, all within your browser. Ideal for managing translation strings without server uploads, it ensures sensitive linguistic data remains private. The output is pre-configured as a JSON array, perfect for direct integration into most modern web and mobile applications requiring an array of translation objects.
Workflow Checklist
- CSV header row includes 'key' and all target language codes (e.g., 'en', 'es', 'de').
- All translation strings are properly escaped within CSV cells if they contain commas or quotes.
- Generated JSON array contains the expected number of objects, matching CSV rows (minus header).
- Output JSON string passes linting tools (e.g., JSONLint) for syntax correctness before deployment.
Parent Tool & Hub
Step-by-Step Guide: Convert Translation String CSV to i18n JSON
Follow these exact steps to complete this workflow locally in your browser without uploading files.
- 1
Prepare your CSV for i18n
Ensure your CSV file has a header row with columns like 'key', 'en', 'fr', 'es', etc., representing translation keys and language codes. Save it as UTF-8 with BOM for broad compatibility, especially if using Excel.
Tip: Verify no empty rows or stray commas exist; these can cause parsing errors. - 2
Upload your localization CSV
Drag and drop your prepared CSV file directly into the designated upload area on this page. Alternatively, click the upload button to select your file via your operating system's file picker (e.g., Windows Explorer, macOS Finder).
Tip: Only select one CSV file at a time for accurate processing. - 3
Verify automatic parsing
The tool will automatically detect columns and initiate the conversion. Review the live preview pane to ensure your translation keys and values are correctly parsed into the array structure. Confirm the 'outputFormat' is set to 'array' (it's pre-configured here).
Tip: Check for correct language code mapping (e.g., 'en' for English). - 4
Inspect generated i18n JSON
Examine the generated JSON output in the preview window. Each row from your CSV should correspond to an object within the JSON array, with 'key' and language codes as properties. This structure aligns with common i18n library expectations.
Tip: Look for any unescaped special characters that might have corrupted values. - 5
Download your i18n JSON array
Click the 'Download JSON' button to save the converted i18n JSON array to your local machine. The file will be named 'localization.json' by default, ready for deployment or further integration into your project.
Tip: Keep a backup of your original CSV for version control and future edits.
Technical Specifications & Preset Reference
| Parameter | Recommended Setting | Why It Matters |
|---|---|---|
| Output Format | JSON Array | This preset generates an array of objects, ideal for i18n libraries that iterate over a list of translation entries. |
| Input Encoding | UTF-8 (with BOM recommended) | Ensures all international characters in your translation strings are correctly interpreted and prevent 'garbled text' issues. |
| Column Mapping | 'key' + language codes | Standardizes the structure, mapping your unique translation identifiers and corresponding language values efficiently. |
| Processing Location | Browser-local | Your sensitive translation data never leaves your device, maintaining privacy and security without server interaction. |
| Max File Size | Browser memory dependent | Larger CSVs consume more memory; modern browsers handle substantial files, but extreme sizes may cause slowdowns. |
Common Issues & Troubleshooting Fixes
CSV values appear as 'null' or 'undefined' in JSON
Check your CSV for empty cells or incorrect column headers. Ensure the CSV is properly delimited (usually comma) and saved as UTF-8.
JSON output is a single object instead of an array of objects
This tool is pre-configured for 'array' output. If you used a different CSV to JSON tool, ensure its 'outputFormat' setting is explicitly 'array' or similar.
Special characters (e.g., Ă©, ĂĽ) are corrupted in the JSON output
Resave your source CSV file with UTF-8 encoding, specifically UTF-8 with BOM (Byte Order Mark), from your spreadsheet software like Excel.
JSON keys like 'key' or language codes are missing or incorrect
Verify your CSV's first row contains the exact header names 'key', 'en', 'fr', etc., without typos. The tool relies on these headers.
Why Run This Workflow Locally in ShowPro?
Unlike remote CSV to JSON converters that require uploading your sensitive localization strings to external servers, ShowPro processes everything locally in your browser. This is critical for i18n data, ensuring your translation keys, proprietary phrases, and unreleased product names remain on your machine, preventing potential data leaks or compliance issues, especially with pre-configured array output.
Frequently Asked Questions
Why is the output always a JSON array for this specific tool?
This particular tool is pre-configured to output an array of JSON objects because it's the most common format expected by modern i18n libraries and frameworks for managing translation strings efficiently.
Can I convert a CSV with different column headers than 'key' and language codes?
While this tool is optimized for 'key' and language codes, it will convert any CSV. However, you'll need to manually adjust your i18n library's configuration to match your custom column names after conversion.
Does this tool support nested JSON structures from a flat CSV?
No, this specific tool is designed for a flat CSV to a flat array of JSON objects, which is standard for i18n string management. For nested JSON, you would typically need a more advanced CSV parsing logic.
What if my CSV contains thousands of translation strings?
The tool processes large CSVs efficiently within your browser, leveraging modern JavaScript APIs. Performance depends on your machine's resources, but it's generally robust for typical localization file sizes.
Is my translation data truly private when using this converter?
Absolutely. All conversion processes occur entirely within your web browser using client-side JavaScript. Your CSV file and its contents are never uploaded to any server, ensuring complete privacy and data security.