Skip to content

Instantly share code, notes, and snippets.

@ctrlcmdshft
Created October 24, 2025 17:22
Show Gist options
  • Select an option

  • Save ctrlcmdshft/fe6baead7be858ca08666f34da028163 to your computer and use it in GitHub Desktop.

Select an option

Save ctrlcmdshft/fe6baead7be858ca08666f34da028163 to your computer and use it in GitHub Desktop.
Bitwarden export import fields

Below is a comprehensive list of all fields that can be included in the Bitwarden JSON format for import and export, based on the Bitwarden CLI documentation and the JSON import format specified at https://bitwarden.com/help/import-data/#bitwarden-import-format. These fields apply to both personal and organization vault exports/imports, with notes on where they are specific to one or the other. The list covers the root object, folders, collections, and items (including type-specific sub-objects).

Root-Level Fields

  • encrypted: Boolean (optional; e.g., false for unencrypted, typically present in organization exports).
  • folders: Array of folder objects (personal vaults; empty [] or omitted for organization vaults).
  • collections: Array of collection objects (organization vaults; empty [] or omitted for personal vaults).
  • items: Array of item objects (required; core vault data).

Folder Object Fields (in folders array)

  • id: String (UUID, required for referencing in items).
  • name: String (required).

Collection Object Fields (in collections array, organization vaults only)

  • id: String (UUID, required).
  • organizationId: String (UUID, required).
  • name: String (required).
  • externalId: String or null (optional).

Item Object Fields (in items array)

Common Fields (all item types)

  • id: String (UUID, optional; auto-generated on import if omitted).
  • organizationId: String or null (required for organization items, null for personal items).
  • folderId: String or null (references folder ID, personal vaults only).
  • type: Integer (required; 1 = login, 2 = secure note, 3 = card, 4 = identity).
  • reprompt: Integer (optional; 0 = no reprompt, 1 = reprompt; defaults to 0).
  • name: String (required).
  • notes: String or null (optional; used for notes, especially for secure notes).
  • favorite: Boolean (optional; e.g., true or false).
  • fields: Array of custom field objects (optional). Each field object contains:
    • name: String (required).
    • value: String (required).
    • type: Integer (required; e.g., 0 = text, 1 = hidden, 2 = boolean, 3 = linked).
  • collectionIds: Array of strings or null (organization vaults only; references collection IDs).
  • revisionDate: String (ISO 8601, optional; e.g., "2025-10-24T12:00:00.000Z").
  • creationDate: String (ISO 8601, optional; e.g., "2025-01-01T00:00:00.000Z").
  • deletedDate: String or null (optional; ISO 8601 or null).
  • passwordHistory: Array of password history objects (optional). Each object contains:
    • lastUsedDate: String (ISO 8601, required; e.g., "2025-06-01T00:00:00.000Z").
    • password: String (required).

Type-Specific Sub-Object Fields

Each item includes one type-specific sub-object based on its type value. These can be empty {} for minimal imports but may include additional fields in full exports.

  1. Login (type: 1, sub-object: login)

    • username: String or null (optional).
    • password: String or null (optional).
    • totp: String or null (optional; TOTP seed for two-factor authentication).
    • uris: Array of URI objects (optional). Each URI object contains:
      • uri: String (required).
      • match: String or null (optional; URI matching type, e.g., "default", "host").
  2. Secure Note (type: 2, sub-object: secureNote)

    • No fields required (always {}; content stored in top-level notes field).
  3. Card (type: 3, sub-object: card)

    • No fields required for minimal import ({}), but full exports may include:
      • cardholderName: String or null (optional).
      • brand: String or null (optional; e.g., "Visa").
      • number: String or null (optional).
      • expMonth: String or null (optional).
      • expYear: String or null (optional).
      • code: String or null (optional; CVV code).
  4. Identity (type: 4, sub-object: identity)

    • No fields required for minimal import ({}), but full exports may include:
      • title: String or null (optional).
      • firstName: String or null (optional).
      • middleName: String or null (optional).
      • lastName: String or null (optional).
      • address1: String or null (optional).
      • address2: String or null (optional).
      • address3: String or null (optional).
      • city: String or null (optional).
      • state: String or null (optional).
      • postalCode: String or null (optional).
      • country: String or null (optional).
      • phone: String or null (optional).
      • email: String or null (optional).
      • username: String or null (optional).

Notes

  • Minimal Requirements: For items, only type, name, and an empty type-specific sub-object (e.g., "login": {}) are required for import. Other fields are optional but included in exports when applicable.
  • Excluded Fields: Attachments are not included in JSON exports/imports; use --format zip for attachments.
  • Encrypted JSON: When using --format encrypted_json, the entire JSON structure is encrypted, but the schema remains the same once decrypted.
  • Context-Specific Fields:
    • folders and folderId are used only in personal vault exports/imports.
    • collections, collectionIds, and organizationId are used only in organization vault exports/imports.

This list is derived from the Bitwarden import format documentation and CLI export behavior, ensuring all possible fields are covered. If you need a specific subset or further clarification, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment