Codebook Export

We here at Zetetic are not looking to trap your data in Codebook, that's why we've provided a robust set of Export features should you need to get your data out of Codebook. This page documents how to export your data, and the format of that data. Codebook's Export feature is available on macOS and Windows, it is not available on Android and iOS. Codebook for macOS and Windows are both free to download in trial mode.

WARNING: Exporting your data to your computer's file system leaves that data unencrypted! We strongly recommend at least saving any exported files to an encrypted file system or encrypted disk image. Codebook both warns you about this before exporting your data to be sure this is what you want, and requires your Master Password before allowing the operation to proceed. This way no one can simply walk up to your workstation while you are logged in and export all of your data!

To export all (or some) of the entries in your database, select the File menu > Export. The following options are available there:

  • Export Database
  • Export Favorites
  • Export Selected Entries
  • Export Images

The first three of these are all focused on exporting the text items in your database, from your Entries and Notes, and produce a text file when chosen. They will not export any images stored on your Entries (see Exporting Image Attachments). Due to its general ubiquity in other apps, Codebook provides data for export in CSV format, as well as a plain-text option (intended for printing a physical backup).

Export Database will export all of your records, Export Favorites will limit the list of records exported to those in the Favorites list, and Export Selected Entries does exactly what it sounds like. In the dialog that appears you can select your text export format:

  • CSV
  • Codebook CSV
  • Plain Text

Images (and other files such as PDFs) that are attached to your Entries cannot be usefully exported to a text format. Instead, Codebook provides these files in a .ZIP archive. The folders in the archive are named after the Categories and Entries these files came from. Click on the File menu, go to Export, then Export Images and you will see the following options:

Export Database Images Exports all image attachments from your entire database.
Export Favorites Images Exports any image attachments on Entries in the Favorites list.
Export Selected Entries Images Exports any image attachments on the currently selected Entries.
Entry The name of the record.
Category The name of the category the record will be assigned.
Note Entry If the record is a Note this field contains the text.
Entry Icon The icon in Codebook to assign to the record.
Category Icon The icon in Codebook to assign to the category.
All other columns List the fields for each record.

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, so the number of lines in the export file will likely exceed the number of records exported. It's best to spot-check your exported data in a spreadsheet editor before doing something else with it.

Codebook CSV is a modification of the CSV format intended so that you can export and re-import your data to Codebook.

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. Normally on export Codebook will concatenate these values with a newline (\n) character. However, if you select Codebook CSV format instead, Codebook will join these values by a | (pipe) character as the field value to use for the Password column for that record. However, since your data may legitimately have the pipe characters, those are escaped with a \ (backslash) character.

Let's suppose we have a database with two records, where the first has two Password fields, and the second has one Password field with a | in it, f|x7h3r4t3s. The exported data would look like this:

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

This means that to use these values you'll need to process them and scan for escaped pipes. Because these values are escaped in this way, you can directly import a Codebook CSV Export without modifying the file.

See Also