Skip to content

Instantly share code, notes, and snippets.

@luther7
Created November 21, 2021 23:17
Show Gist options
  • Save luther7/994a446baef883337022a80a4b34fc02 to your computer and use it in GitHub Desktop.
Save luther7/994a446baef883337022a80a4b34fc02 to your computer and use it in GitHub Desktop.
Convert a Bitwarden CSV export to import into 1password

Bitwarden to 1password

Convert a Bitwarden CSV export to import into 1password.

Limitations

  • MIT license.
  • Use at your own risk - no warranty.
  • Recommend to upload your Bitwarden export as a note in 1password in case of any mistakes in this script.
  • Only supports logins and notes.
  • Imported notes will be prepended with Field 2:

Requires

  • sqlite3

Usage

  1. Install sqlite3
  2. Export your Bitwarden vault as a CSV and rename to bitwarden-export.csv
  3. Run sqlite3 < bitwarden-to-1password.sqlite3
  4. Import 1password-logins.csv into 1password. Choose item type Login
  5. Import 1password-notes.csv into 1password. Choose item type Notes

Thanks

.mode csv
.import bitwarden-export.csv bitwarden
.output 1password-logins.csv
SELECT
name AS title,
login_uri AS website,
login_username AS username,
login_password AS password, notes
FROM
bitwarden
WHERE
type = 'login';
.output 1password-notes.csv
SELECT
name AS title,
notes AS 'text of note'
FROM
bitwarden
WHERE
type = 'note';
MIT License
Copyright (c) 2021 Franz Luther Neulist Carroll
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment