# Notes on Plain Text Export & Import

Warning: The Export of sensitive information from a Password Safe database to a text file has serious security consequences. This operation will create an unprotected copy of all of the passwords in the database. Deleting this copy after use is not sufficient and other actions should be taken to properly erase the data (e.g. third party “shredding” utilities). The export of sensitive data effectively bypasses the security of the Password Safe program.

Note: The Export and Import to/from text files feature has been changed in V3.06. This page describes the current format.

Exported text will:

- Begin with a Title Row as the first record in the text file
- Use a delimiter to replace the “newline” character in a multi-line Notes field and the period (‘.’) if present in the Title field. The default is ‘»’ [Alt+0187], which may be overridden if needed.

Imported text is assumed to have:

- A Title Row as the first record in the text file.
- A delimiter to reinstate the “newline” character in a multi-line Notes field and the period (‘.’), if present, in the Title field. The default is ‘»’ [Alt+0187], which may be overridden if needed.

The Title Row for full data export currently contains the following fields by default, separated by a tab.

- Group/Title
- Username
- Password
- URL
- AutoType
- Created Time
- Password Modified Time
- Last Access Time
- Password Expiry Date
- Record Modified Time
- History
- Notes

You may use the “Advanced” feature to exclude any number of these fields from the Title Row and the corresponding exported data.

During Import, the supplied Title Row must include “column headings” that match exactly one of the above. If any “column heading” is repeated, only the data in the last one will be added to the entries during import. If a “column heading” does not match one of the above, the data in that column will be ignored during import. The character separating the “column headings” must be the same as the one you specify separating the associated data in the following entry records in the text file being imported.

Notes:

- To import any data into Password Safe, the Title and Password fields must be present and neither blank nor empty, as it would be if adding a new entry to an existing database.

- There is no restriction on the order of the “column headings”. Password Safe will use the supplied Title Row to correctly add the specified data to the right field.

## Data Formats

Column Heading/Field | Comments
Group/Title | If present, groups are separated by periods (‘.’). The Title field cannot be blank, empty or contain the delimiter character.
Username |
Password | Cannot be blank or empty.
URL |
AutoType |
Created Time | See note 1 below
Password Modified Time | See note 1 below
Last Access Time | See note 1 below
Password Expiry Date | See note 1 below
Record Modified Time | See note 1 below
History | See note 2 below
Notes | The Notes field should be enclosed by double quotes ("like this"). The Notes field should not contain the delimiter character since on import it will be translated to a newline.

Notes:

1 | Time fields can be one of the following 3 formats:

1. yyyy/mm/dd hh:mm:ss e.g., 2007/01/26 19:31:25
2. ddd MMM dd hh:mm:ss yyyy e.g., Fri Jan 26 19:31:25 2007
3. yyyy-mm-ddThh:mm:ss e.g., 2007-01-26T19:31:25

where:

- yyyy The year in full. Value is between 1970 and 2038.
- mm The month; e.g. 01 = January, 02 = February etc.
- dd The day of the month
- MMM The short form of the month; e.g. Jan = January, Feb = February etc.
- ddd The short form of the day of the week; e.g. Mon = Monday, Tue = Tuesday, etc.
- hh The hour using a 24-hour clock.
- mm The minutes
- ss The seconds

Note: Format ‘2’ is the output from the ANSI C function ‘`asctime`’ and format ‘3’ conforms to the ISO 8601 standard.

2 | Password history is represented in the exported entry record as a text field comprising a header followed by the required number of entries of old passwords:

Password History Header:

- 1 hexadecimal digit status for saving PWH for this entry (0 = no; 1 = yes)
- 2 hexadecimal digits maximum number of entries in this entry
- 2 hexadecimal digits number of entries currently saved

Each Password History Entry:

- 8 hexadecimal digits time old password was set
- 4 hexadecimal digits length of old password
- character string old password