# CSV Import

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FeoM3j4KonrGlVTplxtph%2FImport-Keeper-CSV.jpg?alt=media&#x26;token=57b54001-e054-485f-998a-cfb9e9fd6b86" alt=""><figcaption></figcaption></figure>

## Commander **CSV Record Import**

Keeper Commander supports .csv text file import using comma separated values. CSV import files can contain data for certain fields, folders, subfolders, shared folders and default shared folder permissions.

Use this order of fields shown below with commas separating each value (and no spaces around the commas). Not all fields are required; some can be left blank.

{% code title="myimport.csv" overflow="wrap" %}

```csv
Folder,Title,Login,Password,Website Address,Notes,Shared Folder,Custom Field1 Name,Custom Field1 Value,Custom Field2 Name,Custom Field2 Value
```

{% endcode %}

<table><thead><tr><th width="114">Position</th><th width="97">Column</th><th width="210">Value</th><th>Description / Format</th></tr></thead><tbody><tr><td>1</td><td>A</td><td>Folder</td><td>FolderName\Subfolder (optional)</td></tr><tr><td>2</td><td>B</td><td>Title</td><td>Name of the record (required)</td></tr><tr><td>3</td><td>C</td><td>Login (Username)</td><td>sampleuser</td></tr><tr><td>4</td><td>D</td><td>Password</td><td>samplepassword</td></tr><tr><td>5</td><td>E</td><td>Website Address (URL)</td><td>domain.com/login</td></tr><tr><td>6</td><td>F</td><td>Notes</td><td>notes about this account (optional)</td></tr><tr><td>7</td><td>G</td><td>Shared Folder Name</td><td>SharedFolderName (optional)</td></tr><tr><td>8</td><td>H</td><td>Custom Field 1 Name</td><td><mark style="color:green;"><code>$oneTimeCode</code></mark></td></tr><tr><td>9</td><td>I</td><td>Custom Field 1 Value</td><td>otpauth://totp/?secret=ABC123ABC123ABC123ABC123ABC123</td></tr><tr><td>10</td><td>J</td><td>Custom Field 2 Name</td><td><mark style="color:green;"><code>$type</code></mark></td></tr><tr><td>11</td><td>K</td><td>Custom Field 2 Value</td><td>login</td></tr><tr><td></td><td></td><td></td><td></td></tr></tbody></table>

{% hint style="info" %}
Custom fields begin with the name in the 8th field, (column H). The custom field value goes in the next field (column I).
{% endhint %}

* To specify subfolders, use backslash "\\" between folder names
* To set shared folder permission on the record, use the #edit or #reshare tags as seen below
* Enclose fields in quotes for multi-line or special characters
* Ensure files are UTF-8 encoded for support of international or double-byte characters

Below is an example csv file that showcases several import features including personal folders, shared folders, subfolders, special characters and multi-line fields.

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```
Business,Twitter,marketing@company.com,password,https://twitter.com,Some interesting notes!,,API Key,"131939-AAAEKJLE-491231$##%!",Date Created,2018-04-02
Subfolder1,Twitter,craig@gmail.com,xwVnk0hfJmd2M$2l4shGF#p,https://twitter.com,,Social Media\Customer1#edit#reshare
Subfolder2,Facebook,craig@gmail.com,TycWyxodkQw4IrX9VFxj8F8,https://facebook.com,,Social Media\Customer2#edit#reshare
,Google Dev Account,mydevaccount@gmail.com,"8123,9fKJRefa$!@#4912fkk!--3",https://accounts.google.com,"Google Cloud ID 448812771239122
Account Number 449128
This is multi-line",Shared Accounts#edit#reshare,2FA Phone Number,+19165551212
```

{% endcode %}

To import this file as "login" records:

```
keeper import --format=csv --login-type test.csv
```

The resulting vault will look like this:

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FsNUsczX8Hx71qxdS8M6E%2FScreenshot%202023-02-14%20at%205.18.07%20PM.jpg?alt=media&#x26;token=30db152a-d444-46f8-bf71-67ce51870f50" alt=""><figcaption><p>CSV Import Sample</p></figcaption></figure>

Here is a list of some record types (you may have more if you have custom record types, or less if you are restricting some record types):

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FqorAIVkSECp8b5jvQeOZ%2FWindowsTerminal_wOnQKBPAAK.png?alt=media&#x26;token=00e4f459-8cea-46c3-8bf4-6c314bc19068" alt=""><figcaption><p>Record types can be listed as a custom field value when the custom field name is $type</p></figcaption></figure>

Below is a list of all possible field types (including custom fields). **You can use these as a custom field names such as&#x20;**<mark style="color:green;">**`$oneTimeCode`**</mark>**&#x20;as shown below.**

<table data-full-width="true"><thead><tr><th>Folder</th><th>Title</th><th>Login</th><th>Password</th><th>Website Address</th><th>Notes</th><th>Shared Folder</th><th>Custom Field1 Name</th><th>Custom Field1 Value</th><th>Custom Field2 Name</th><th>Custom Field2 Value</th><th>Custom Field3 Name</th><th>Custom Field3 Value</th><th>Custom Field4 Name</th><th>Custom Field4 Value</th></tr></thead><tbody><tr><td>Folder1\subfolder</td><td>My Login Account</td><td>user@example.com</td><td>liu.W241Q&#x3C;q$RGl9r;N1</td><td><a href="http://www.google.com/">www.google.com</a></td><td>main google account</td><td>TeamFolder</td><td>$oneTimeCode</td><td>otpauth://totp/?secret=ABC123ABC123ABC123ABC123ABC123</td><td>$type</td><td>login</td><td>$host</td><td>10.0.0.1</td><td>$url</td><td><a href="http://www.example.com/">www.example.com</a></td></tr></tbody></table>

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FFGSYxcuPALAx9F6enlfT%2FWindowsTerminal_myNZzFQtif.png?alt=media&#x26;token=309856f4-e8d8-48c5-858e-103e9d471c1f" alt=""><figcaption><p>All Field Types that can be used as Custom Field Name $oneTimeCode</p></figcaption></figure>

More advanced import options are available using the [JSON Import](https://docs.keeper.io/en/keeperpam/commander-cli/command-reference/import-and-export-commands/json-import) format described in the next section.
