Codebook Import

Many customers adopting Codebook for their password manager already have their data stored in another app or format. Since most password managers have a feature allowing you to export your records to the CSV (comma-separated values) format, Codebook's Import feature expects data in CSV format. Usually some modification to this file is necessary before Codebook can import it, but in some cases little to no edits are required.

Information about the Export feature is also available.

Requirements

There are a few requirements on the format of your CSV file for import:

  • The file must be a valid CSV file; properly escaped data is supported.
  • The delimiter supported is comma (tab is not supported as a delimiter).
  • The file should be encoded with Unicode (UTF-8).
  • A spreadsheet editor to review and adjust the file for Import.
  • Codebook for Windows or macOS (Import is unavailable on iOS and Android).

Editing a CSV file "by hand" (e.g. in a text editor), especially a large file, can be quite difficult. We recommend using spreadsheet editor software that can Export or Save As your file in CSV format. Excel, Numbers, and OpenOffice.org's Calc all do this reasonably well.

Format

  • A header row naming all columns must be present.
  • Each row (after the first, header row) describes one record.
  • One column must be named Entry, used for naming a record in Codebook.
  • One column must be named Category, used for naming the Category where the record belongs in Codebook.
  • Additional columns name the Fields for each record, and are matched against existing labels in Codebook.

Codebook for Windows imports and exports in our modified Codebook CSV format. Please see the section on Codebook CSV below for additional adjustments users must make to their CSV file for import in Codebook for Windows. Feature development is currently underway to change this, please check back later.

Special (Reserved) Column Names

In addition to the Entry and Category columns, there are a few other special column names used by Codebook's Import feature that cannot be used to label Fields:

Note Entry To create a Note record for long form text.
Entry Icon The icon in Codebook to assign to the record.
Category Icon The icon in Codebook to assign to the category.

Any value in the Entry Icon or Category Icon fields will be checked against the list of icons in Codebook before it is used to make sure it is valid. Invalid values will be ignored.

Example CSV

A sample file might look something like this:

Entry,Category,Account,Email,Note,Password,Phone,PIN,Username,Website
"Credit Card",Financial,3759 876613 21001,,"exp:12/12
CVV:3829",secret,1-800-123-4567,4,mscott,http://mycreditcard.com
"Insurance Policy",Financial,3759 876613 21001,,secret: name of your first pet? spot,secret,1-800-123-4567,4,mscott,http://myinsurance.com
"Shopping Website",Personal,,mscott@mailinator.com,,secret,,,,http://paypal.com

Note that newlines are supported in a CSV as long as the data is properly escaped. In the above example the first two lines after the header make up the first record, due to the line break in the note field, demonstrating why it's easier to edit CSV files in a spreadsheet editor.

Codebook CSV [Optional]

In addition to regular CSV files, Codebook also support Codebook CSV, a slight modification to the format that allows us to store more than one value in a particular field. This is more useful for exporting from and re-importing into Codebook itself. Most customers will not need this format and it is presented here for completeness and accuracy.

A record in Codebook can have any number of Fields attached to it, even the same type of field multiple times. For instance, an Entry record could have two Password fields attached to it. If you need to have multiple fields with the same label: put them in the same column in your CSV file, joined by a pipe | character. This also means that any pipe characters already in your data/passwords must be escaped before import, with a backslash \.

In the following example, the first row has two password fields, the second row has one, escaped:

Entry,Category,Email,Password
"Bank of Mars",Financial,wgray@mars.sol,myoldpassword|mynewpassword
"Bank of Duckberg",Financial,scrooge@mcdu.ck,f\|x7h3r4t3s

Using that example, the first entry will have two Password fields, myoldpassword and mynewpasssword. The second entry will only have one Password field, because the pipe is escaped, so the resulting value would be f|x7h3r4t3s.

Import CSV

This feature is currently limited to Codebook for macOS. If you are using Codebook for Windows please jump to Import Codebook CSV.

This is the basic set of steps you'll want to take to import data either from a file you created yourself, one you exported from Codebook, or one from another app.

  1. Open your data in a spreadsheet editor, massage it into the format above
  2. Save your changes and ensure you save or export to a CSV file (not xls)
  3. Launch Codebook on your PC or Mac and log in
  4. Select File menu > Import > Import CSV
  5. In the Open dialog, select your CSV file

Import Codebook CSV

Codebook for Window's Import feature expects this format. Work is underway now to allow traditional CSV import format.

This is the basic set of steps you'll want to take to import data either from a file you created yourself, one you exported from Codebook, or one from another app.

  1. Open your data in a spreadsheet editor, massage it into the format above
  2. Search for | (pipe) characters in your data and escape them with \ (backslash)
  3. Save your changes and ensure you save or export to a CSV file (not xls)
  4. Launch Codebook on your PC or Mac and log in
  5. Select File menu > Import > Import Codebook CSV (On Windows select File menu > Import CSV)
  6. In the Open dialog, select your CSV file

Import KeePass CSV

This feature is currently limited to Codebook for macOS.

Codebook is able to directly import CSV files generated by KeePass. To import data from KeePass:

  1. Launch KeePass and sign in
  2. Select File menu > Export > CSV File
  3. Launch Codebook and sign in
  4. Select File menu > Import > Import KeePass CSV...
  5. In the Open dialog, select the file you generated using KeePass's Export feature

Import Keeper CSV

This feature is currently limited to Codebook for macOS, version 3.7.0.

Codebook is able to directly import CSV files generated by Keeper. To import data from Keeper:

  1. Log into Keeper Security Password Manager
  2. Click on More > Backup and next to Export to Text File click on Export Now and save the CSV file.
  3. Launch Codebook and sign in
  4. Select File menu > Import > Import Keeper CSV...
  5. In the Open dialog, select the file you generated using Keeper's Export feature

Import LastPass CSV

This feature is currently limited to Codebook for macOS, version 3.7.0.

Codebook is able to directly import CSV files generated by LastPass. To import data from LastPass:

  1. Log into your LastPass account
  2. Click on LastPass Icon > More Options > Advanced > Export (or Tools > Advanced Tools > Export To if using the browser plugin) and select LastPass CSV File
  3. Launch Codebook and sign in
  4. Select File menu > Import > Import Keeper CSV...
  5. In the Open dialog, select the file you generated using LastPass's Export feature

Import 1Password CSV

As of version 3.7.0, Codebook for macOS supports importing 1Password CSV files directly without making the modifications described below. Click on File menu, Import, "Import 1 Password CSV..." after exporting your data from 1Password.

CSV files generated by 1Password can usually be imported with just a few adjustments:

  1. Launch 1Password and sign in
  2. Select File menu > Export and select either All Items... or Selected Items...
  3. In the dialog that appears select "Comma Delimited Text" from the File Format drop-down menu
  4. Check the Include Column Labels checkbox
  5. Add any additional fields you wish to export and click Save
  6. Open your data in a spreadsheet editor
  7. Re-name the Title column to Entry, and the Type column to Category
  8. If you are using Codebook for Windows you'll need to adjust the file to Codebook CSV (this is not necessary using Codebook for macOS)
  9. Save your changes and ensure you save or export to a CSV file (not xls)
  10. Launch Codebook on your PC or Mac and log in
  11. Select File menu > Import > Import CSV... (On Windows select File menu > Import CSV)
  12. In the Open dialog, select your CSV file