Free tool

Convert JSON to XLIFF

XLIFF is what a translation agency asks for. JSON is what your app reads. This produces XLIFF 1.2 that Trados, memoQ and Poedit open.

Runs in your browser. No account, no upload, nothing leaves your machine.

JSONXLIFF

Runs in your browser. The file is never uploaded.

The format the industry actually asks for

Send a translation agency a JSON file and it will come back asking for XLIFF, because that is what every CAT tool imports natively: Trados, memoQ, Phrase, Poedit. XLIFF 1.2 is the version they all accept; 2.0 is newer and less widely supported, so this writes 1.2 and reads both. Each key becomes a trans-unit with its id, the string becomes the source, the target is left empty for the translator to fill, and a translator comment becomes a note.

What survives

Converting is easy. Not breaking the file is the hard part.

Every converter that treats a language file as plain text will eventually ship you a crash. These are the three places it happens.

Placeholders stay placeholders
%@, %lld, %1$s, {name} and {{count}} come out exactly as they went in. A placeholder that got escaped, renumbered or translated is a crash on the device, not a typo.
Plural forms stay separate
Xcode variations, the Android plurals element and gettext msgstr[n] all mean the same thing and all spell it differently. They map onto each other here instead of collapsing into one string. Polish has four forms; all four survive.
Keys keep their shape
Nesting, dotted paths, arrays and translator comments carry across wherever the target format has somewhere to put them. Where it does not, the section below says so.

What does not come across

Written down here, because the alternative is finding out in a broken build.

Reading XLIFF, inline markup inside a source element is flattened to plain text, so a source with formatting tags in it arrives as the words without the tags. Segment state attributes and file-level metadata beyond the language pair are not kept. Writing XLIFF, the source and target languages default to en and de; edit the two attributes in the header if you need a different pair.

How it works

  1. Step 1

    Drop the file in

    Drag your JSON onto the left box, pick it with the file button, or paste the text. Nothing is uploaded. The conversion runs in this tab.

  2. Step 2

    Read the result

    The XLIFF appears as you type. The counter under the box says how many keys came through, so a file that lost half its content is visible immediately.

  3. Step 3

    Copy or download

    Take the text to the clipboard, or download it with the right extension. Swap the arrow to go the other way.

One language file in. 64 languages out.

Converting a format is the part you can do by hand. Translating 3,627 keys into 64 languages without breaking a single placeholder is the part you cannot. On the next release you only pay for the strings that changed.

€19 per month incl. VAT, cancellable monthly.

Questions

XLIFF 1.2 or 2.0?
It writes 1.2, because that is the version agencies and CAT tools accept without argument. It reads both, so an Xcode export in 2.0 comes in fine.
The target elements are empty. Is that right?
Yes. That is what an XLIFF for translation looks like. The source holds your text, the target is where the translator writes. Converting back, a filled target wins over the source; where the target is still empty the source is used, so you never get a file of blank strings.
Can I read an XLIFF that came back from the agency?
Swap the direction and paste it in. If you want to review or edit it as a table first, the XLIFF viewer does that, including a round trip through Excel.
Does it work with a WordPress WPML export?
Yes. WPML exports XLIFF 1.2 with a namespace and note elements, all of which are read. The same reader powers the XLIFF viewer on this site.