Importing and Exporting XML
SamuraiSafe supports the XML file formats generated by the original (Windows) Password Safe and the derivative Java Password Safe programs for import:
- Fields recognised are <group> <title> <username> <password> <notes> and <url>.
- Fields making up an entry must be enclosed within either <pwentry> or <entry>.
- A number of entries must be enclosed within either <pwlist> or <passwordsafe>.
- Unrecognised tags are ignored.
Here is a short XML sample:

If <group> is missing, the imported entry will be added to a group called <No Group>.
The exported XML conforms to the Java Password Safe format (as in above sample).
User defined fields can be exported and imported. They should however follow XML naming rules:
- must start with a letter or underscore,
- can contain letters, digits, hyphens, underscores, and periods.
Notes
- modifiedDate and passwordDate are exported/imported in local time zone,
- a user defined field of the same name as a built in field name will replace the built in value on import,
- an empty field name will be labeled no_label,
- spaces in user defined field names are replaced with hyphens.
If you have password file data in CSV format, you can find a CSV to XML conversion tool here: help.samarama.net
Note there are security implications to XML import/export as the plaintext may be stored permanently on your system inadvertently. To ensure any XML files are removed securely use rm -P on the command line to overwrite files before deleting them.