Skip to main content
The Export library (libs/tools/export) provides comprehensive vault export functionality for Bitwarden. This library enables users and organizations to export their vault data in various formats for backup, migration, or compliance purposes.

Overview

The Export library is organized under vault-export and contains two main packages:
  • @bitwarden/vault-export-core - Core export logic, types, and services
  • @bitwarden/vault-export-ui - Angular UI components for vault export
The library is used across all Bitwarden client applications:
  • Web Vault
  • Desktop Application
  • Browser Extension
  • CLI

Architecture

The export library follows a service-oriented architecture with separate implementations for individual vaults and organization vaults.

Core Services

Located in libs/tools/export/vault-export/vault-export-core/src/services/

VaultExportServiceAbstraction

File: vault-export.service.abstraction.ts Main service interface for vault exports. Methods:

IndividualVaultExportService

File: individual-vault-export.service.ts Handles exports for individual user vaults, including ciphers, folders, and attachments. Key Methods:
Implementation Details: The service extends BaseVaultExportService and handles:
  • Folder decryption and export
  • Cipher decryption and export
  • Attachment handling
  • Format conversion (CSV, JSON, encrypted JSON)
Constructor Dependencies:

Export Formats

The library supports four export formats:

CSV Format

Format: "csv" Exports vault data as comma-separated values. Suitable for spreadsheet applications and basic backups. Includes:
  • Folders
  • Logins
  • Cards
  • Identities
  • Secure notes
Limitations:
  • No attachments
  • No custom fields (in some cases)
  • Limited metadata
Example:

JSON Format

Format: "json" Exports vault data as unencrypted JSON. Contains complete vault structure with all metadata. Includes:
  • All cipher data
  • Folders and collections
  • Custom fields
  • Attachments (metadata only)
  • Full metadata (creation dates, revision dates, etc.)
Example Structure:

Encrypted JSON Format

Format: "encrypted_json" Exports vault data as password-protected, encrypted JSON. Most secure export option. Features:
  • Password-based encryption
  • Complete vault data
  • Maintains encryption at rest
  • Suitable for secure backups
Security:
  • Uses account’s KDF settings (PBKDF2, Argon2)
  • Generates unique encryption key from password
  • All sensitive data remains encrypted
Example Structure:

ZIP Format

Format: "zip" Exports vault as a ZIP archive containing JSON export plus attachments. Includes:
  • JSON vault export
  • All cipher attachments
  • Folder structure for attachments
Use Cases:
  • Complete backup with files
  • Migration with attachments
  • Archival purposes

Export Types

Located in libs/tools/export/vault-export/vault-export-core/src/types/

ExportedVault

Union type representing any exported vault format:

BitwardenUnEncryptedIndividualJsonExport

Structure for unencrypted JSON exports:

BitwardenEncryptedIndividualJsonExport

Structure for encrypted JSON exports:

Usage Examples

Export Individual Vault as JSON

Export with Password Protection

Export Organization Vault

Get Available Export Formats

Export Helpers

ExportHelper

File: export-helper.ts Utility class for common export operations:
  • CSV generation using PapaParse
  • JSON formatting
  • ZIP archive creation using JSZip
  • File attachment handling
  • Data sanitization

Security Considerations

Unencrypted Exports

Formats: CSV, JSON
  • Data is exported in plain text
  • No encryption at rest
  • Should be stored securely
  • Recommended for immediate import only
  • Delete after use

Encrypted Exports

Format: Encrypted JSON
  • Password-based encryption
  • Uses user’s KDF settings
  • Secure for long-term storage
  • Requires password to import
  • Resistant to brute force attacks

Best Practices

  1. Use encrypted exports for backups
  2. Use strong passwords for encrypted exports
  3. Store exports securely (encrypted drives, secure cloud storage)
  4. Delete unencrypted exports after immediate use
  5. Verify exports before deleting vault data
  6. Limit export access in organizations

Export Restrictions

Organization Policies

Organizations can restrict exports:
  • Disable personal vault export
  • Disable organization vault export
  • Require password-protected exports
  • Audit export activities

User Permissions

Export permissions vary by role:
  • Owner/Admin - Full export access
  • User - Personal vault only
  • Custom roles - Configurable permissions

Integration Example

Complete Export Workflow: