Convert between CSV (Comma Separated Value) files and the TBX format for terminology exchange.


csv2tbx [--charset=CHARSET] [--columnorder=COLUMNORDER] <csv> <tbx>



is a CSV file


is the target TBX file

Options (csv2tbx):


show program’s version number and exit

-h, --help

show this help message and exit


output a manpage based on the help


show progress as: dots, none, bar, names, verbose


show errorlevel as: none, message, exception, traceback

-i INPUT, --input=INPUT

read from INPUT in csv format

-x EXCLUDE, --exclude=EXCLUDE

exclude names matching EXCLUDE from input paths

-o OUTPUT, --output=OUTPUT

write to OUTPUT in tbx format

-S, --timestamp

skip conversion if the output file has newer timestamp


set charset to decode from csv files


specify the order and position of columns (comment,source,target)

CSV file layout

The CSV file is expected to have three columns (separated by commas, not other characters like semicolons), of which the default layout is






All the PO #: location comments. These are not used in the TBX files, and can be left empty, but could be generated by po2csv


Source Language

The msgid or source string


Target Language

The msgstr or target language


These examples demonstrate the use of csv2tbx:

csv2tbx terms.csv terms.tbx

to simply convert terms.csv to terms.tbx.

To convert a directory recursively to another directory with the same structure of files:

csv2tbx csv-dir tbx-target-dir

This will convert CSV files in csv-dir to TBX files placed in tbx-target-dir.:

csv2tbx --charset=windows-1250 csv tbx

Users working on Windows will often return files in encoding other the Unicode based encodings. In this case we convert CSV files found in csv from windows-1250 to UTF-8 and place the correctly encoded files in tbx. Note that UTF-8 is the only available destination encoding.

Two column CSV

csv2tbx --columnorder=source,target foo.csv foo.tbx


For conformance to the standards and to see which features are implemented, see CSV and TBX.