PO to JSON converter
Convert a gettext .po translation catalogue to JSON, and back again.
PO to JSON converter
Paste a gettext .po catalogue and this tool converts every msgid/msgstr pair into a JSON object, ready to load into a JavaScript i18n library or inspect by hand. Flip the direction and it works the other way too, turning a JSON translation object back into a valid .po file. Developers use it to bridge translation-management tools that export .po with front-end stacks that expect JSON, without installing gettext tooling or writing a one-off script.
The options control the exact shape of the JSON. "Nest keys by dotted msgid" turns a flat catalogue like "nav.home" into nested objects instead of one long key. "Drop entries with an empty translation" filters out msgids nobody has translated yet. Plural forms (msgid_plural plus msgstr[0], msgstr[1]...) become either a JSON array or separate suffixed keys like key_0 and key_1. A msgctxt context, when present, can fold into the key as a context|msgid prefix so identical English strings used in different places don't collide. Comments, source references and the catalogue header (the metadata block at the top of most .po files) can each be kept or dropped.
Multi-line and concatenated string literals, escaped quotes, backslashes and newlines are handled the way gettext itself writes them, in both directions. The live tally reports how many entries are translated, untranslated and marked fuzzy, so you can gauge catalogue completeness without opening a translation editor. Very large catalogues are supported; a result that would exceed the output size limit produces a message instead of freezing the tab.
Everything runs locally in your browser — a .po file often contains a product's entire UI text, and none of it is uploaded anywhere. Copy the result, download it as a .txt file, or send it straight back into the input to convert again in the opposite direction.