keychain2bitwarden is a js utility to convert a macOS Safari Keychain export csv to Bitwarden's json format.
Important
This repo is archived as of September 2023, and will not be updated or actively maintained any further. Use at your own discretion.
-
Export your Keychain passwords via Safari on MacOS:
Preferences → Passwords → … → Export passwords.
Save the csv file in a convenient place. -
Run
keychain2bitwarden converton that export file:
npx keychain2bitwarden convert Passwords.csv > keychain.jsonNote that keychain2bitwarden outputs to stdout, so you'll need to redirect it's output to your file.
-
Import
keychain.jsonin your Bitwarden vault through the web UI at https://vault.bitwarden.com/#/tools/import -
Delete both
Passwords.csvaskeychain.csv— as these files contain all your passwords in plain text, so don't leave these laying around!