SamuraiSafe for macOS directly imports XML format password files exported from either the Windows or Java versions of PasswordSafe. To assist in migration from other products, I provide a simple CSV to XML conversion program. It is an AWK script, which to run requires familiarity with the UNIX command line.

If your password data is available in an Excel file, it is easy to export into CSV format: Click File/Save As... and select Comma Separated Values (.csv)

To run the CSV to XML converter, start the UNIX command line: Open Terminal (located in /Applications/Utilities) on macOS. Then type the following at the Terminal prompt:

awk -f convertCSVtoXML.awk < [full path to inputfile] > [full path to outputfile]

Warnings may appear on error output. You must have at least two valid header field names on line 1 on the input file. Rename if necessary. Valid header field names are: group,title,username,password,url,notes (in any order). Other fields will be ignored.

So valid input would be:

News,"Washington Post",bwsmith,987938721982,,"digital subscription"

You can get by with just title,username,password.

The converter conforms to the CSV standard (RFC 4180). Unfortunately some CSV generators don’t conform to the standard — which may mean some editing of the input will be required. Let me know if you get stuck.

Download convertCSVtoXML.awk
(SHA1=710186e888ce66abc396606d766d23ac1e61b17b) How to verify SHA1?

Note there are security implications to CSV or XML import/export as the plaintext may be stored permanently on your system inadvertently. To ensure any CSV or XML files are removed securely use rm -P on the command line to overwrite files before deleting them.