Import generic CSV files into KeePass
How KeePass's Generic CSV Importer maps CSV columns to entry fields, where imports can silently alter data, and how to check results before deleting the source file.
Exports from password managers, browsers and spreadsheets often arrive as comma- or tab-separated text. KeePass 2.x can read these files with its Generic CSV Importer, which lets you describe a file's structure instead of requiring one fixed layout. This review covers what the importer changes, where data can be lost or altered, and when another route is the better choice. No version-specific test results or measurements were available for this article. Statements about the importer describe its general documented design, and menu labels may differ between releases.
Is the Generic CSV Importer the right tool for your file?
The importer works well when your source can only export delimited text, or when no dedicated KeePass import format exists for it. Its main benefit is flexibility. You set the separator, the text qualifier and the meaning of each column, so files with unusual layouts can still be imported.
The tradeoff is that flexibility shifts the responsibility to you. The importer does not know that a column holds passwords or URLs unless you assign it, and a wrong setting can produce entries that look plausible but are wrong. If KeePass lists a dedicated import format for your source application, try that format first, because it already encodes the source's field layout. If the data is small, entering it by hand may be safer than cleaning up a messy CSV.
Keeping the data as plain CSV is only preferable for a short-lived, non-sensitive list, or when the file feeds another non-KeePass tool. For credentials, an unencrypted CSV is a liability. It should exist only for as long as the import takes.
What the import actually changes
This is a format conversion, not a visual transformation. The importer reads each record from the text file, splits it into fields, and writes those values into KeePass entries in your database. The stored characters should match the source if the encoding is set correctly. What changes is the structure: values move from columns in a plain-text file into named entry fields in an encrypted database.
The main settings in the importer dialog govern how the text is parsed:
- Encoding: how bytes in the file are decoded into characters, for example UTF-8 or a legacy Windows code page.
- Field separator: the character between values, such as a comma, semicolon or tab.
- Record separator: what ends a row, normally a line break.
- Text qualifier: the character, usually a double quote, that wraps values containing separators or line breaks.
- Escape sequence interpretation: whether sequences such as a backslash followed by n are turned into control characters.
- Whitespace trimming: whether spaces at the start and end of each field are removed.
- Field mapping: an ordered list assigning each column a role such as Title, User Name, Password, URL, Notes, Group, a custom field, or Ignore.
- First-row handling: an option to skip a header row so column names are not imported as an entry.
A preview shows how the file will be split before anything is written. Treat it as the main check. If a column lands in the wrong field there, it will land in the wrong field in the database too.
An illustrative input with a header row, a quoted value containing a comma, and a doubled quote inside a quoted field:
Title,Username,Password,URL,Notes
Mail,alice,"p,ss""word",https://mail.example,"Two-factor on"
Bank,alice123,S3cure!,https://bank.example,
Set the comma as separator, the double quote as qualifier, the first row as skipped, and the columns as Title, User Name, Password, URL and Notes. Under standard CSV quoting rules, the first entry's password should come through as p,ss"word, with the comma kept and the doubled quote reduced to one. The second entry should have empty notes. If the qualifier is set wrong, the first record would instead split at the comma inside the password and shift the following columns. This example illustrates the parsing rules. It is not a recorded test of a specific KeePass version.
Where values can be altered without warning
- Whitespace trimming can change passwords that genuinely begin or end with a space. Leave trimming off unless you know no field depends on edge spaces.
- Escape sequence interpretation can turn a literal backslash sequence inside a password into a different character. Enable it only if the source file is known to use escapes.
- A wrong encoding produces garbled accented letters, non-Latin scripts or symbols. Compare the preview against the original file before importing.
- Multi-line notes import correctly only if they are wrapped in the text qualifier in the source file.
- Opening or saving the CSV in a spreadsheet before import can change values. Leading zeros may be dropped, some strings may be read as dates or numbers, and cells beginning with an equals sign may be treated as formulas.
- Groups, tags, timestamps and custom fields import only if they are present as columns and mapped explicitly. Anything mapped to Ignore, or not exported by the source, is not recreated.
- Attachments, password history and other structured metadata usually cannot travel through a flat CSV file at all.
Will the result stay usable after import and sharing?
Once imported, values live as ordinary KeePass entry fields. They can be copied with the usual copy and auto-type features and edited like any other entry, so the conversion does not reduce day-to-day usability. Searching depends on correct mapping. A URL that ended up in Notes will not behave as a URL field, and a password left in a custom field may not be used where KeePass expects the main password.
Reading order and display are not affected the way they would be by reversed or decorative text, because the characters themselves are unchanged. No documentation or scoped test was available on how specific screen readers handle imported KeePass entries. Assistive technology behavior is therefore an open question, not a confirmed property.
Sharing is where the real risk lies. The CSV holds every credential in readable form, and anyone or any process with access to the file can read it. After confirming the import, delete the CSV and any copies, and check sync folders, downloads, email attachments and backups. The encrypted database, not the CSV, is what should be kept or shared.
How this differs from other import routes
Dedicated import formats in KeePass are built for a known source layout and need little or no manual mapping. The Generic CSV Importer applies to any delimited file but depends on correct settings. KeePass 1.x and KeePass-compatible applications such as KeePassXC have their own CSV import features, with different options and behavior. Settings described here for KeePass 2.x should not be assumed to carry over.
A cautious import sequence
- Back up the existing database, or import into a new database first so mistakes stay isolated.
- Inspect the CSV in a plain-text editor rather than a spreadsheet to see the actual separators, quoting and encoding.
- Set encoding, separators and qualifier, then map every column and mark unneeded ones as Ignore.
- Check the preview row by row for shifted columns, garbled characters and header rows imported as entries.
- Import, then spot-check several entries, especially ones with special characters, long notes or unusual passwords.
- Delete the CSV and any copies once the results are verified.
Unresolved points
Several points could not be confirmed from the supplied evidence: exact option names in current KeePass releases, default values for trimming and escape handling, behavior with very large files, and compatibility with specific exporters. Check these against the documentation for the version you run, and against a small test import, before converting a full credential set.