Runs in your browser. Files are not uploaded unless the tool says otherwise.
Flatten nested JSON translation files to dot-notation keys or unflatten them back, with sorting and custom separators.
Runs in your browser. Files are not uploaded unless the tool says otherwise.
A nested JSON file groups translations in objects: { "checkout": { "title": "Checkout" } }. A flat file stores the same value under one dot-separated key: { "checkout.title": "Checkout" }. Both describe identical content, but many tools accept only one of the two shapes. Flattening converts nested objects into single-level keys, and unflattening rebuilds the object tree from the separator in the key names.
t("checkout.title") resolves either shape. Set keySeparator: false if your keys contain dots.Arrays can be turned into indexed keys such as steps.0, steps.1, or kept as array values. Keys that already contain the separator are ambiguous after unflattening: a file with botha and a.b cannot be rebuilt, and the tool reports the conflict instead of silently dropping a value. Empty objects are removed unless you choose to keep them, because most libraries treat an empty group as no translations at all.