File Formats - KeePass - KeePass Documentation (2024)

previous page next page

File Formats - KeePass - KeePass Documentation (1)KeePass supports importing/exporting data from/to various file formats.

KeePass 1.x supports importing data from CSV files (special form),CodeWallet, Password Safe, and Personal Vault.

KeePass 2.x supports importing data from CSV files (all),KeePass 1.x (KDB, XML and CSV), KeePass 2.x XML,1Password Pro, 1PW, Alle meine Passworte,Any Password, CodeWallet, DataVault, FlexWallet,Handy Safe, Handy Safe Pro,Kaspersky Password Manager, KeePassX,Mozilla Bookmarks, PassKeeper,Passphrase Keeper, Password Agent,Password Depot, Password Exporter, Password Gorilla,Password Keeper, Password Memory, Password Prompter,Password Safe, Passwords Plus, Passwort.Tresor, Personal Vault,PINs, Revelation, RoboForm,Security TXT, SplashID CSV, Steganos Password Manager 2007,Sticky Password,Whisper 32, ZDNet's Password Pro, and Spamex.com.

For both KeePass 1.x and 2.x, there are importer plugins available, whichadd more import capabilities/formats.

  • For KeePass 1.x:
    • File Format: CSV
    • File Format: XML
  • For KeePass 2.x:
    • Generic CSV Importer
    • Formats that require custom options/steps in order to be imported:
      • How to Import CodeWallet TXT 6.05
      • How to Import Password Gorilla CSV 1.42
      • How to Import PINs TXT 4.50
      • How to Import Data from RoboForm
      • How to Import Data from Steganos Password Manager 2007
      • How to Import Data from PassKeeper 1.2
      • How to Import 1Password Pro CSV

Unfortunately there isn't any standard password database format. Every passwordmanager uses its own file format. Anyway, almost all support exporting to CSV or XMLfiles. This sounds good at first glance, but CSV and XML files aren't specialized passworddatabase formats, they only specify a low-level layout of the stored data (for CSV: data fieldsare separated by commas; for XML: hierarchical form using tags). These formats do notspecify the high-level arrangement of the data (for CSV: order/meaning of the fields; forXML: tag names and structure). Because of this, many users are confused when application #1exports data to CSV/XML and application #2 can't read the CSV/XML file, although it claimsthat it can read those files.

This help page details the expected CSV and XML file formats. Knowing the formats whichKeePass expects, you can reformat CSV and XML files exported by other password managers tomatch the KeePass formats. CSV files can be reformatted using e.g. OpenOffice Calc(see below).XML files can be reformatted using an XML editor.

KeePass can import many password database formats directly (see top of this page).Additionally, there are specializedKeePass Plugins availablefor importing more formats (like AnyPassword CSV, Oubliette files, PINs TXT, ZSafe files, andmany more...). Using these plugins, you don't need to manually reformat the output ofother password managers; you can directly import the exported files.

If no import plugin exists for importing data from your previous password manager,feel free to post a request for it in theKeePass Feature Requests Trackerand/or in theOpenDiscussion forum.


File Formats - KeePass - KeePass Documentation (2)FileFormat: CSV (KeePass 1.x)

KeePass imports and exports data from/to CSV files in the following format:

"Account","Login Name","Password","Web Site","Comments"

For a detailed example, download this file:File Formats - KeePass - KeePass Documentation (3)FileSample_CSV.zip.This file is zipped only in order to ensure correct encoding (if not zipped, browsers ordownload managers could automatically convert the file to a different encoding). When importinga CSV file, it must not be zipped!

Important notes about the format:

  • The file must be encoded using UTF-8 (Unicode). Other encodings are not supported.
  • CSV files only support the following fields: title, user name, password, URL and notes.Other fields like last entry modification time, expiration time, icon, entry file attachments,etc. are not supported. If you want to transfer such information, you have to usea different format (like XML).
  • All fields must be enclosed in quotes ("). These quotes are mandatory, unquoted fields are not allowed.
  • Quotes (") in strings are encoded as \" (two characters).Backslashes (\) are encoded as \\.
  • Multiline comments are realized through normal line breaks. Encoding line breaksby \n is not supported.

Microsoft Excel by default does not enclose fields in quotes (").It is recommended that you useOpenOffice Calcto create a correct CSV file (see below), or use the Generic CSV Importerof KeePass 2.x (import your CSV file into KeePass 2.x, then export the data to aKeePass 1.x KDB file), or fix the CSV file by manually adding the quotes using a text editor.

If you want to transfer data between KeePass 1.x databases, you mustnot change the default export options of KeePass.Do not export additional fields or uncheck any options, otherwiseKeePass will not be able to re-import the CSV file, because it does not comply to thespecification above any more.

Using OpenOffice Calc to create a CSV file:
OpenOffice Calccan be used to create CSV files that can be imported correctly into KeePass. Follow these steps:

  • Make sure you got 5 columns as described above.
  • Select everything, right-click and select 'Format Cells'. In the dialog, choose Textas category. Click [OK].
  • Go 'File' -> 'Save As...', choose a location and make sure that the check box'Edit Filter Settings' is enabled. Click the 'Save' button.
  • Choose 'Unicode (UTF-8)' as character set. The field separator must be set to a comma.The text separator must be ". Make sure that the Fixed Column Widthbox is not checked. Click [OK].

File Formats - KeePass - KeePass Documentation (4)FileFormat: XML (KeePass 1.x)

This section describes the KeePass 1.x XML format. Note that this formatis different from the XML format used by KeePass 2.x (anyway, KeePass 2.xcan import KeePass 1.x XML files).

You can download a detailed XML sample file here:File Formats - KeePass - KeePass Documentation (5)FileSample_XML.zip.This file is zipped only in order to ensure correct encoding (if not zipped, browsers ordownload managers could automatically convert the file to a different encoding). When importinga XML file, it of course must not be zipped!

Important notes about the format:

  • The files must be encoded using UTF-8 (Unicode). Other encodings are not supported.
  • The following five entities must be encoded: < > & " '. They are encodedby &lt; &gt; &amp; &quot; &apos;.
  • The UUID is a hex-encoded 16-byte string (i.e. an 32 ANSI hexcharacter string in the XML file). Itis unique (also across multiple databases) and can be used to identify entries.
  • Dates/times are encoded in the standard date/time XML format (YYYY-MM-DDTHH:mm:ss):first the date in form YYYY-MM-DD, a 'T' character, and thetime in form HH:mm:ss.

File Formats - KeePass - KeePass Documentation (6)GenericCSV Importer

KeePass 2.x ships with a genericCSV importer. This tool can import almost all CSV formats out there. The CSVfiles are loaded and you can manually specify the encoding / character set, assign columnsto data fields, andspecify how the low-level structure looks like (usage of quotes, etc.).

To start the generic CSV file importer, click 'File' -> 'Import' andchoose 'Generic CSV Importer'.


File Formats - KeePass - KeePass Documentation (7)How to ImportCodeWallet TXT 6.05

CodeWallet is a password manager that supports different card types (fields).KeePass cannot know which of the CodeWallet fields correspond to the KeePassstandard fields (title, user name, ...), because they don't have fixed names (language-dependent,user-customizable, ...).Therefore all fields from the CodeWallet file are imported into custom string fieldsof KeePass entries. After importing the file, you can move some of the stringsto the correct standard fields (by clicking the 'Move' button on the second tab pageof the entries dialog.


File Formats - KeePass - KeePass Documentation (8)How to ImportPassword Gorilla CSV 1.42

In order to successfully import a Password Gorilla CSV file, you needto configure the following settings in 'File - Preferences - Export' inPassword Gorilla:

  • Enable 'Include password field'.
  • Enable 'Include notes field'.
  • Enable 'Save as Unicode text file'.
  • Set the field separator to 'µ' (mu, press AltGr+M).
  • Make sure you didn't use the 'µ' character anywhere in your password database.

When you carefully set these options, export the data to a CSV file and importit into KeePass using 'File -> Import' in KeePass 2.x.


File Formats - KeePass - KeePass Documentation (9)How to ImportPINs TXT 4.50

In order to successfully import a PINs TXT file, you need to do the following:

  • Switch PINs language to 'English'.
  • In PINs export dialog: Enable all fields.
  • In PINs export dialog: Set separator to 'tab'.
  • In PINs export dialog: Enable 'Quote texts'.

After exporting a TXT file using the settings above, import it using'File -> Import' in KeePass 2.x.


File Formats - KeePass - KeePass Documentation (10)How to ImportData from RoboForm

First you need to export your passcards to a HTML file. To do this, openRoboForm's Passcard Editor ('Edit Passcards' or 'RoboForm Editor'in the Windows start menu)and in the editor's main menu go 'Passcard' -> 'Print List'(in newer versions you have to click the 'RoboForm' button and go'Print List' -> 'Passcards'). In thedialog that opens, click the 'Save' button. Choose a location and file name,and click 'Save'.

Open your KeePass 2.x database file and go 'File' -> 'Import'.Choose 'RoboForm HTML' as format and select the HTML file you just exported,then click 'OK'.


File Formats - KeePass - KeePass Documentation (11)How to ImportData from Steganos Password Manager 2007

Warning! It is possible that the transfer fails and that KeePass accidentlyoverwrites your existing passwords in Steganos Password Manager. Therefore backup yourSEF file before starting the import! In any case you should restore your passwords byrestoring the backup you just created after the import process! Even if you thinkKeePass hasn't changed anything, restore from the backup!

Unfortunately Steganos Password Manager (SPM) lacks any form of export functionality. As theSEF file format (in which the data is stored) is proprietary and no specificationis available, KeePass needs to try to get all the data out of the windows ofSPM.

The import process works as follows. First you start SPM and open your passworddatabase. The main password management window should be open (i.e. the one which listsyour items in the middle of the screen, and got toolbar-like buttons at the top). Makesure that all your items are displayed in the list (select the correct filter inthe combobox above the item list).

Now switch to KeePass 2.x and open your KeePass database. Go File -> Import andchoose Steganos Password Manager 2007. Click [OK]. Now read the rest before continuing.

After pressing the [Yes] button in the KeePass import confirmation dialog, you got10 seconds to switch to the SPM window. Select the very first entry within the SPM window(but do not open it, just select it). This is important! The first entry must have thekeyboard focus and must be selected.

When the 10 seconds are over, KeePass will start importing. You will see howKeePass opens the SPM items, copies the data, closes the item's window, select thenext item, etc. Everything goes automatic now and you can just sit back and watch.Sometimes Windows playes a ding sound, this is normal.

Note that it can take quite some time to import your items. Do not doanything while KeePass is importing! One single mouse click or keypress can ruin thecomplete import process.

The last item will be scanned twice. When completed, KeePass willshow a message "The import process has finished!".

It is possible that KeePass failed to import some items (mainly caused by SPM'sunpredictable slow response times). It is highly recommended that you compare each ofthe entries.


File Formats - KeePass - KeePass Documentation (12)How to ImportData from PassKeeper 1.2

The import process works visually, exactly like the import method forSteganos Password Manager data. Please read all instructions inHow to Import Data from Steganos Password Manager.


File Formats - KeePass - KeePass Documentation (13)How to Import1Password Pro CSV

KeePass can import CSV files exported by 1Password Pro. When exporting thedata, make sure:

  • All fields must be exported, in the original order.
  • Choose the tabulator (Tab) as field separator.
  • The option for enclosing fields in quotes must be enabled.
File Formats - KeePass - KeePass Documentation (2024)
Top Articles
Latest Posts
Article information

Author: Dr. Pierre Goyette

Last Updated:

Views: 5845

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Dr. Pierre Goyette

Birthday: 1998-01-29

Address: Apt. 611 3357 Yong Plain, West Audra, IL 70053

Phone: +5819954278378

Job: Construction Director

Hobby: Embroidery, Creative writing, Shopping, Driving, Stand-up comedy, Coffee roasting, Scrapbooking

Introduction: My name is Dr. Pierre Goyette, I am a enchanting, powerful, jolly, rich, graceful, colorful, zany person who loves writing and wants to share my knowledge and understanding with you.