Vault format schemas
This reference describes the unencrypted input accepted by each @vaultlint/vault-formats adapter. Format identifiers match the VaultFormatId values in the package API. Detection uses provider signatures and, for structured JSON, Zod schemas. Provider exports vary by app version; optional and unknown provider fields are retained where the adapter can represent them.
All inputs are converted to the canonical VaultData model. The authoritative TypeScript declarations are in packages/vault-schema/src/index.ts.
Canonical schema
Section titled “Canonical schema”| Object | Fields |
|---|---|
VaultData |
{ encrypted?: boolean; folders?: VaultFolder[]; collections?: VaultCollection[]; items: VaultItem[]; [key: string]: unknown }. |
VaultFolder |
{ id: string; name: string }. |
VaultCollection |
{ id: string; name: string; organizationId?: string; externalId?: string | null }. |
VaultItem |
id?: string, name?: string, type?: number, folderId?: string | null, collectionIds?: (string | null)[] | null, favorite?: boolean, reprompt?: number, notes?: string, organizationId?: string | null, creationDate?: string | null, deletedDate?: string | null, lastModified?: string, revisionDate?: string | null, passwordHistory?: { password: string; lastUsedDate: string | null }[], secureNote?: { type: number }, login?: VaultLogin, card?: VaultCard, identity?: VaultIdentity, fields?: VaultCustomField[], _providerData?: Record<string, unknown>, and provider extensions. |
VaultLogin |
username?: string, password?: string, uris?: VaultUri[], totp?: string, fido?: unknown, fido2Credentials?: VaultFido2Credential[] | null, and provider extensions. VaultUri is string | { uri: string; match?: number | null }. |
VaultFido2Credential |
Optional string properties: credentialId, keyType, keyAlgorithm, keyCurve, keyValue, rpId, counter, discoverable, userHandle, userName, rpName, userDisplayName; creationDate?: string | null; provider extensions. |
VaultCard |
Optional string properties: cardholderName, brand, number, expMonth, expYear, code. |
VaultIdentity |
Optional string properties: title, firstName, middleName, lastName, username, company, email, phone, address1, city, state, postalCode, country, ssn, passportNumber, licenseNumber; address2?: string | null, address3?: string | null; provider extensions. |
VaultCustomField |
{ name: string; value: string; type?: number; linkedId?: number | null }. The numeric type is provider-specific. |
The common numeric item types are 1 login, 2 secure note, 3 payment card, and 4 identity. Adapters can retain provider-only fields in _providerData or named custom fields when those have a stable canonical representation. Importers reject encrypted input.
JSON and archive formats
Section titled “JSON and archive formats”| ID | Accepted root / signature | Field mapping and details |
|---|---|---|
bitwarden-json |
Object with items: []; optional folders, collections, encrypted. Item fields include type, name, notes, login, card, identity, and fields. |
Login URIs, username, password, TOTP, cards, identities, folders, and custom fields map to canonical fields. encrypted: true is rejected. Unknown root and item keys are tolerated. |
dashlane-json |
Object with AUTHENTIFIANT: []; optional NOTE: []. Login entries may include title, domain, login, secondaryLogin, email, password, note, otpSecret, and category. |
Domain becomes a URI; login/email/secondary login, password, OTP, notes, and category are mapped. Secure notes use title, content, and category. Unknown provider keys are tolerated. |
enpass-json |
{ "items": [...], "folders": [...] }. An item can have uuid, title, note, template_type, fields, folder UUIDs, trashed, archived, timestamps, and attachments. Fields carry type, label, value, sensitive, and deleted. Folder entries use uuid, parent_uuid, and title. |
Login/password, URL, email, TOTP, payment-card fields, custom fields, folder hierarchy, archive state, and Unix-second timestamps are mapped. Deleted/section/blank fields are ignored; trashed records are omitted with a warning. Attachments are not imported. Zod accepts string or numeric field values and boolean or numeric flags. |
keeper-json |
Object with records: []; optional shared_folders. Records may include title, login, password, login_url, notes, custom_fields, folders, fields, and $type. |
$type values login, note, and paymentCard are mapped. TOTP and custom fields are read from custom_fields; card values are read from the fields[].value[] objects. Folder paths are flattened. Unknown fields are tolerated. |
protonpass-json |
Object with provider vaults map; each vault can contain name, items, and folders. Also accepted from the unencrypted Proton ZIP at Proton Pass/data.json. |
Login, URL, TOTP, notes, custom fields, and folder data are mapped. encrypted: true is rejected. Optional object keys are tolerated. |
1password-1pux |
ZIP archive containing export.data, or the JSON contents of export.data directly. Root is { accounts: Account[] }; accounts contain vaults and vaults contain items. |
Vaults become folders; item category, title, URLs, credentials, notes, sections/custom fields, dates, and password history are mapped. Recognized credit-card and identity labels populate canonical fields while remaining custom fields preserve scalar source values. Tags, archive status, and FIDO2 credentials are not represented. ZIP entry and JSON container structure are validated before parsing. |
JSON Zod schemas allow provider extensions where the format uses .passthrough(), while checking required arrays and field types used by the parser. A schema match is a structural check, not a guarantee that every provider-specific feature is preserved by the canonical model.
CSV formats
Section titled “CSV formats”CSV headers are matched case-insensitively after trimming. CSV parsers support quoted cells, commas, and embedded line breaks according to the provider adapter. Optional columns may be absent unless noted.
| ID | Required identifying columns / accepted headers | Field mapping and details |
| –––––––– | ———————————————————————————————————————————————————————————————————————– | –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– | –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– |
| bitwarden-csv | Requires login_uri, login_username, login_password; personal and organization export columns are described below. | Login values, URI, TOTP, notes, folder/collection, type, and additional fields are mapped. |
| lastpass-csv | Requires url, username, password, extra, grouping, fav; optional name, totp. | Login data, notes, group/folder, favorite and TOTP are mapped. |
| 1password-csv | Requires Title, Username, and Password, plus one recognized signature: OTPAuth, Favorite, Tags; or Url; or Website. Header matching is case-insensitive. | Login credentials, URLs, notes, favorite, TOTP, and tags are mapped when present. CSV cannot represent all 1Password item categories. |
| keepass-csv | KeePass CSV headers including Group, Title, Username, Password, URL, Notes. | Standard KeePass CSV login columns and groups are mapped. CSV files are unencrypted. |
| protonpass-csv | Proton Pass export headers including name, url, username, password, and note; optional totp, folder, type. | Login, TOTP, notes, folders, and supported card/note values are mapped. |
| dashlane-csv | Standard variants: username, username2, title, password, url; older title, password, url, otpSecret; or import template Type, name, url, username, password, note, totp, collections. | Credentials, notes, URI, OTP, and category/collection map to canonical fields. Template rows typed as notes become secure notes. Unsupported provider-specific card data is not inferred from a generic CSV row. |
| nordpass-csv | Requires name, url, username, password, cardholdername, and folder (supports optional note, card, identity, type, totp, and shared_folder columns). | Login, TOTP, notes, folder, payment-card columns, and identity columns are mapped when present. |
| enpass-csv | Enpass login template: Title, Username, Email, Password, Website, TOTP Secret Key, Custom Field 1, *Custom Field 2, Note, Tags. | This template is for login items. Tags map to folders; only login items are exported to this CSV format. |
| keeper-csv | Title, Login, Password, Website Address; optional Folder, Notes. | Standard Keeper CSV login fields are mapped. JSON is the richer Keeper format. |
| roboform-csv | Name, Url, Login, Note, Folder; recognizes MatchUrl, Pwd/Password, and RfFieldsV2/RF_fields. | RfFieldsV2 spills across trailing CSV cells. Its entries use name,?,?,txt | pwd,value; TOTP KEY$ maps to TOTP and password-type fields are marked sensitive. Login, bookmark, and safe-note rows are supported. RoboForm exports cards and identities as printouts, not this CSV, so they cannot be imported from it. |
| chrome-csv | Chromium browser CSV: name, url, username, password; Chrome, Edge, and Brave variants are recognized. | Browser credentials map to logins. |
| firefox-csv | url, username, password, httpRealm, formActionOrigin. | Browser credentials map to logins, using available URL columns. |
| safari-csv | Title, URL, Username, Password; accepts Safari/macOS Passwords CSV capitalization variants. | Browser credentials and URL map to logins. |
Exact CSV contracts
Section titled “Exact CSV contracts”The lists below show the column order written by exportVault. Import detection is generally more permissive: it checks a subset of identifying headers and reads recognized columns by name, so extra columns and reordered columns are accepted unless the notes say otherwise.
For implementation-level definitions, see the format registry, adapter sources, CSV codec, and canonical TypeScript schema.
| ID | Export header order | Import signature and recognized aliases |
| –––––––– | –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– | —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— | —————– |
| bitwarden-csv | Personal: folder, favorite, type, name, notes, fields, reprompt, login_uri, login_username, login_password, login_totp. Organization: collections, type, name, notes, fields, reprompt, login_uri, login_username, login_password, login_totp. | Requires login_uri, login_username, login_password. folder and collections are interchangeable location sources; login_uri accepts comma/newline-separated URIs. type accepts login, note/securenote, card, and identity; CSV output cannot retain card or identity details. |
| lastpass-csv | url, username, password, totp, extra, name, grouping, fav. | Requires url, username, password, extra, grouping, fav; totp and name are optional. fav accepts 1 or true. http://sn / https://sn identifies a secure note. |
| 1password-csv | Title, Url, Username, Password, OTPAuth, Favorite, Archived, Tags, Notes. | Requires Title, Username, Password, plus OTPAuth/Favorite/Tags, or Url, or Website. Reads Url/URL/Website, OTPAuth/TOTP, and Tags/Folder/Vault. The first comma-separated location tag becomes the folder. Archived is emitted as false; input archive state and item types are not preserved. |
| keepass-csv | Group, Title, Username, Password, URL, Notes, TOTP, Last Modified. | Recognizes Group/Title/Username/Password/URL; Title/User Name/Password/URL; or Account/Login Name/Password/Web Site. Also reads Comments, otp, and Last Modified. A leading Root/ is removed from imported groups; export adds Root/. |
| protonpass-csv | type, name, url, autofillUrls, email, username, password, note, totp, vault, createTime, modifyTime. | Requires name, url, username, password, totp, vault; reads email as username fallback. Types note, creditCard/credit_card, and identity map to those item types; other values map to login. JSON-encoded autofillUrls and timestamps are retained as provider metadata when imported. |
| dashlane-csv | username, username2, username3, title, password, note, url, category, otpSecret. | Accepts one of three case-insensitive signatures: the import template Type, name, url, username, password, note, totp, collections; standard username, username2, title, password, url; or older title, password, url, otpSecret. Also reads username3, email, otpUrl, content, and category/collections. Template rows typed as notes become secure notes; card rows are not reconstructed. |
| nordpass-csv | name, url, username, password, note, cardholdername, cardnumber, cvc, expirydate, zipcode, folder, full_name, phone_number, email, address1, address2, city, country, state, type, totp, shared_folder. | Requires name, url, username, password, cardholdername, folder. Recognized type values: note, card/credit_card, identity/personal_info; otherwise login. Card expiry is read as MM/YYYY. Identity full name is split into first name and remaining last name. shared_folder is exported blank. |
| enpass-csv | Title, Username, Email, Password, Website, TOTP Secret Key, Custom Field 1, *Custom Field 2, Note, Tags. | Requires Title, Username, Email, Password, Website, Tags; reads the remaining columns when present. The asterisk on *Custom Field 2 is part of the header. It is a login-only import template, not the complete Enpass JSON export. |
| keeper-csv | Folder, Title, Login, Password, Website Address, Notes. | Requires Title, Login, Password, Website Address; Folder and Notes are optional. CSV import creates login records only. |
| roboform-csv | Base columns: Name, Url, MatchUrl, Login, Pwd, Note, Folder, RfFieldsV2; export may append one trailing CSV cell per custom field. | Requires Name, Url, Login, Note, Folder; recognizes MatchUrl, Pwd/Password, and RfFieldsV2/RF_fields. Each trailing cell after the fields column is interpreted as one name,?,?,txt | pwd,value field. |
| chrome-csv | name, url, username, password, note. | Requires name, url, username, password; allows at most five headers and rejects vault, grouping, or totp to avoid colliding with other formats. |
| firefox-csv | url, username, password, httpRealm, formActionOrigin, guid, timeCreated, timeLastUsed, timePasswordChanged. | Requires the first five listed headers. guid becomes item ID and timePasswordChanged becomes modification time; other Firefox metadata columns are ignored. |
| safari-csv | Title, URL, Username, Password, Notes, OTPAuth. | Requires all six listed columns and rejects headers group, favorite, or tags to avoid format collisions. |
JSON structural field contracts
Section titled “JSON structural field contracts”These describe the fields inspected by the adapters. ? means optional; a nullable field may be absent or explicitly null. Schemas allow additional properties where the provider format is extensible. Detailed mapping behavior and known losses remain in the JSON table above.
| ID | Root contract | Record contract |
|---|---|---|
bitwarden-json |
{ items: object[], folders?: object[], collections?: object[], encrypted?: boolean, ... }. encrypted: true is rejected. |
Folder: id, name strings. Collection: id, name strings and optional organizationId. Item: optional string id, name, organizationId, creationDate, revisionDate; numeric type; boolean favorite; login object with string username, password, totp, and uris of strings or { uri: string } objects; fields[] of { name?: string, value?: string, type?: number }; passwordHistory[] objects; and string/null collectionIds. Unknown properties pass through. |
dashlane-json |
{ AUTHENTIFIANT?: object[], NOTE?: object[], ... }; parser requires AUTHENTIFIANT to be an array. |
Login entries: optional string title, domain, login, secondaryLogin, email, password, note, otpSecret, category. Note entries: optional string title, content, category. Known fields allow null; unknown properties pass through. |
enpass-json |
{ items: EnpassItem[], folders?: EnpassFolder[] }. items is required. |
Item: optional nullable string uuid, title, note, template_type; fields[]; string[] folders; numeric/boolean flags trashed, archived; numeric Unix-second createdAt, updated_at; unknown attachments[]. Field: optional nullable string type, label; nullable string/number value; nullable numeric/boolean sensitive, deleted. Folder: nullable string uuid, parent_uuid, title. |
keeper-json |
{ records: KeeperRecord[], shared_folders?: { path: string, ... }[] }. |
Record: optional nullable strings title, login, password, login_url, notes, $type; custom_fields string-keyed object; folders[] string-valued objects; fields[] of objects with optional nullable string type and required value of any JSON type. Unknown properties pass through. |
protonpass-json |
{ encrypted?: boolean, vaults: Record<string, ProtonVault>, ... }; vaults is required. encrypted: true is rejected. |
Vault: optional nullable string name; optional items[] and folders[] (entries are validated by the importer, not constrained by the root Zod schema); additional vault/root properties pass through. Item fields are listed below. |
1password-1pux |
ZIP export.data JSON: { accounts: Account[], ... }; accounts required. |
Account: optional vaults[]; vault: optional items[]; item fields are listed below. Zod validates the nested accounts/vaults/items containers; provider item contents are mapped by the adapter. |
Proton Pass item shape
Section titled “Proton Pass item shape”The root Zod schema constrains each vault’s items and folders properties to arrays but leaves their contents open for provider-version compatibility. The adapter reads these record fields when present:
| Path | Recognized fields |
|---|---|
item |
itemId?: string, state?: number, modifyTime?: number, createTime?: number, folderId?: string | null, aliasEmail?: string, pinned?: boolean. |
item.data |
type?: string, metadata?: { name?: string; note?: string }, content?, extraFields?; unknown fields are kept on the provider payload for JSON re-export. |
item.data.content |
username, itemUsername, email, itemEmail, password, urls?: string[], totpUri, autofillUrls?: { url: string; mode?: number }[]. |
item.data.extraFields[] |
fieldName?: string, type?: string, data?: { content?: string; totpUri?: string; timestamp?: number }. |
vault.folders[] |
folderId: string, optional nullable parentFolderId, name: string. Nested folders are flattened during import. |
1Password 1PUX item shape
Section titled “1Password 1PUX item shape”The adapter reads the following fields from each vault item’s overview and details objects. Entries not listed here may remain in the raw archive during parsing but are not represented in canonical output.
| Path | Recognized fields |
|---|---|
item |
uuid?: string, favIndex?: number, state?: string, createdAt?: number, updatedAt?: number, categoryUuid?: string. |
item.overview |
title?: string, url?: string, urls?: { url?: string; label?: string }[], tags?: string[], subtitle?: string. |
item.details |
loginFields?: { id?: string; name?: string; fieldType?: string; value?: string; designation?: string }[], notesPlain?: string, password?: string, sections?: Section[], passwordHistory?: { value?: string; time?: number }[]. |
item.details.sections[] |
title?: string, name?: string, fields?: { id?: string; title?: string; value?: string | { totp?: string; string?: string; concealed?: string; creditCardNumber?: string; creditCardType?: string; monthYear?: string; ... } }[]. Recognized scalar card labels include cardholder name, card type, card number, expiration, and security code. Recognized scalar identity labels include personal name, company, contact, address, and document number fields. These values also remain custom fields when mapped into card or identity. |
KeePass XML
Section titled “KeePass XML”keepass-xml accepts unencrypted KeePass 2.x XML with a KeePassFile/Root/Group hierarchy. Entry String pairs map standard Title, UserName, Password, URL, and Notes keys; nested groups become folders. Custom string keys are retained as custom fields. Password-protected KDBX databases are not parsed.
Validation and encrypted exports
Section titled “Validation and encrypted exports”Zod validates the JSON roots and container shapes described above; Bitwarden additionally checks nested record fields before accepting the export. Proton Pass and 1Password validate their root/container structure while their provider records are interpreted by the adapters. CSV detection uses case-insensitive header signatures; Dashlane and RoboForm also validate their provider-specific header shapes and RoboForm rows with Zod. Unknown JSON keys and CSV columns are accepted where possible, since providers add fields over time.
Encrypted Bitwarden and Proton Pass JSON exports are rejected. KeePass .kdbx files and Bramble .bramble backups are encrypted and are not supported. Bramble’s KeePass export is also password-protected: open it in KeePassXC and export as CSV or KeePass XML before importing it into vaultlint. See the Bramble export documentation.
Official format references and CLI schema comparison
Section titled “Official format references and CLI schema comparison”The adapters consume portable export files, not each vendor CLI’s command output. Vendor CLIs may expose different JSON models or omit fields, so the CLI integration normalizes supported output in memory before handing it to the same parser.
| Provider | Official export / schema reference | Comparison with vaultlint |
|---|---|---|
| Bitwarden | Export formats and included data, CLI JSON commands | JSON is the complete supported format; CSV omits cards and identities. Encrypted exports remain rejected. |
| 1Password | 1PUX file and data structure, CLI item JSON and templates, CLI 2 item JSON schema | .1pux and CSV adapters match the documented export choices. The CLI uses op item list --include-archive and pipes the JSON list to op item get --reveal --format json; output is mapped in memory to the supported 1PUX subset. Tags are not represented in the canonical schema, and fields that 1PUX cannot preserve, including passkeys and attachments, are not retained by this CLI path. Recognized card and identity fields map to canonical structures; scalar custom fields retain their source values. CSV contains only Login and Password items. |
| Proton Pass | Export formats, CLI item JSON, CLI item object types, CLI archive export | File imports support plaintext JSON, CSV, and the unencrypted ZIP containing Proton Pass/data.json; encrypted PGP ZIP exports are rejected. CLI listing returns { items, folders }; item-view records are normalized in memory, including credential fields, recognized type aliases, and custom fields, to the Proton JSON adapter shape. CLI types outside the canonical mapping remain available in provider data where the adapter supports them. The CLI archive command creates HTML, which is not an import format here. |
| NordPass | CSV export, CLI output and item commands | The file adapter targets NordPass CSV columns. The new np CLI lists item references as JSON and provides per-item JSON; vaultlint maps those details into the existing CSV schema in memory. The CLI is newer than the file format documentation and its JSON field schema is not formally specified in the help article, so unmapped fields can be lost. |
| Keeper | Keeper import/export guide, Commander JSON record reads, Commander record command source, Commander command reference | JSON and CSV file adapters cover structured records and common login columns. The Commander integration reads current-folder records plus records referenced by folder JSON, then reads each record as JSON directly to stdout, keeping decrypted data in memory. It maps login, note, and payment-card records to the Keeper file adapter shape; unsupported record types are retained as JSON secure-note bodies. Passkeys/attachments and other metadata may not map into the canonical vault schema. |
| Enpass | Enpass JSON export/import, Enpass CSV import template guidance, community enpasscli | The file adapters accept the portable JSON export and the login CSV template. The optional third-party enpasscli can emit detailed JSON entries with -detailed -json; vaultlint maps these through the Enpass JSON adapter. Set VAULTLINT_ENPASS_VAULT and the CLI’s MASTERPW for non-interactive use; its output lacks folder hierarchy and timestamps, and its JSON schema is maintained by the community project rather than Enpass. |
| Dashlane | Dashlane CSV export, Dashlane CLI vault access, CLI encrypted backup | The JSON adapter accepts the portable AUTHENTIFIANT / NOTE export structure. CSV detection accepts legacy exports and the vaultlint import template; passkeys and other details have provider-side CSV limits. The read-only CLI exposes type-specific JSON; vaultlint converts passwords to AUTHENTIFIANT entries and secure notes, secrets, and personal IDs to NOTE entries in memory. Secrets and personal IDs retain their full CLI JSON in the note body, rather than as structured canonical fields. The documented CLI vault commands do not include payment cards. The CLI backup is encrypted SQLite, not a portable import format. |
| LastPass | LastPass CLI export reference | lpass export emits plaintext CSV with the same standard columns the LastPass adapter recognizes. This is already consumed directly in memory by --from-cli lastpass. |
| RoboForm | RoboForm CSV export guide | The adapter matches the documented app-based CSV login export and additionally parses RfFieldsV2 custom-field data when present. Cards and identities are outside this CSV export path. The official docs describe app export workflows; no first-party CLI vault-read schema is documented. |
| Firefox | Firefox CSV export guide | The adapter accepts the documented url, username, and password data plus optional httpRealm and formActionOrigin columns; extra GUID and timestamp columns are ignored. |
| Safari / macOS Passwords | Apple Passwords CSV export guide | The adapter matches the documented Title, URL, Username, and Password columns. Apple notes some shared and Sign in with Apple credentials are not exported. |
| Chrome / Edge / Brave | Chrome password export steps | Chromium exports a CSV with name, URL, username, and password fields, which matches the browser adapter’s case-insensitive header detection. |
| KeePass / KeePassXC | KeePass import/export formats, KeePassXC export limitations | The XML adapter targets KeePass 2.x KeePassFile/Root/Group; the generic CSV adapter accepts the documented entry columns. .kdbx is encrypted and unsupported. KeePassXC has a CLI, but it requires an unlocked database file and does not make encrypted .kdbx a supported input. |
The canonical mappings and loss warnings below are based on the provider export structures. Direct CLI reads are supported for Bitwarden, LastPass, Dashlane, Keeper Commander, 1Password, Proton Pass, NordPass, and the community Enpass CLI. KeePassXC also has command-line tooling, but it operates on encrypted local KDBX databases, which vaultlint rejects by design.
Using the format API
Section titled “Using the format API”VAULT_FORMATS lists adapter metadata (id, display name, provider, extensions, MIME type, and description). parseVault accepts text, bytes, or a parsed JSON object; pass { format } to select an adapter explicitly and { fileName } to preserve extension-based detection and encrypted-file errors. Use parseVaultAsync for ZIP archives in browser environments. Parsing returns the canonical vault, the detected format ID, provider/format names, and import warnings. exportVault takes the canonical vault and a target format ID and returns the file content, MIME type, extension, and export warnings.
import { exportVault, parseVaultAsync, VAULT_FORMATS } from "@vaultlint/vault-formats";
const bytes = new Uint8Array(await file.arrayBuffer());const parsed = await parseVaultAsync(bytes, { fileName: file.name });const converted = exportVault(parsed.vault, "enpass-json");console.log(VAULT_FORMATS.map(({ id, name }) => ({ id, name })));See supported formats for the concise matrix and conversion examples.