# BitWarden to Apple iCloud Keychain passwords converter This Python scripts allows you to move your passwords from BitWarden to Apple iCloud. You need to know: - It ignores secure notes, credit cards and other types that are not passwords. - It ignores BitWarden entries without usernames, passwords and URLs. - It also ignores URLs that do not start with `http://` or `https://`. - It normalizes all TOTP tokens, e.g. `wskg vtqa h5kl bhb4 v4v2 ybyo woc6 qme2` will be converted to `otpauth://totp/example.com:dude@foo.bar?secret=WSKGVTQAH5KLBHB4V4V2YBYOWOC6QME2&issuer=example.com&algorithm=SHA1&digits=6&period=30`. - It preserves names you set for your passwords. - It preserves notes attached to accounts. - It preserves all custom fields attached to accounts. They will be prepended to notes. - BitWarden export does not contain any information about attachments. You should care about them manually. - All entries with multiple URLs (domains) attached will be saved as separate iCloud entries. It's not possible to specify multiple domains for single account yet when importing passwords. See [discussion below](https://gist.github.com/flaksp/6fe1042e12b6b6908c5193c0d6c124a7?permalink_comment_id=5194623#gistcomment-5194623). All ignored (filtered) BitWarden entries will be logged to the console during convertion process. ## Getting started ### Export your BitWarden passwords You should export your BitWarden vault in JSON format (not encrypted). See "[Export Vault Data](https://bitwarden.com/help/export-your-data/)". Exported file will be named like `bitwarden_export_20220426113920.json`, you should rename it to `bitwarden.json`. ### Run script Download Python file attached to the Gist. Place this file in the same directory with `bitwarden.json` file and run it: ```bash python3 convert.py ``` It will generate `icloud.csv` file. ### Import passwords to iCloud To import passwords, you should use generated `icloud.csv` file. See "[Import bookmarks, history, and passwords in Safari on Mac](https://support.apple.com/guide/safari/import-bookmarks-and-passwords-ibrw1015/mac)". ## Bonus ### iOS 18, iPadOS 18, macOS 15 and visionOS 2 Apple finally released [Passwords](https://apps.apple.com/ru/app/passwords/id6473799789?l=en-GB) app! Tips: - On macOS you can add it to the menu bar via app settings. - On iOS and iPadOS you can use "Open App" control in the [Control Center](https://support.apple.com/en-gb/guide/iphone/iph59095ec58/ios) and on the [Lock Screen](https://support.apple.com/en-gb/guide/iphone/iph4d0e6c351/ios). ### Older versions of OS Use a shortcut to quickly open Passwords screen in the Settings app on your Apple devices: https://www.reddit.com/r/shortcuts/comments/w1sa8w/updated_for_macos_13_ventura_and_ios_16_go/