KeyPass
KeyPass copied to clipboard
Import from and Export to csv/json file
Description
I can't restore my existing passwords from Bitwarden with one click.
Solution
I'd like an option to restore passwords from other major password storing apps like Bitwarden and also export to the same format, so we could restore it to the other password managers.
You could do it by doing:
- Import from .CSV/.JSON file.
- Export to .CSV/.JSON file
Example: CSV format:
folder,favorite,type,name,notes,fields,login_uri,login_username,login_password,login_totp
JSON format:
{
"encrypted": false,
"folders": [
{
"id": "c611ce38-a4ac-4d0c-a156-adab005a4ebf",
"name": "Online Storage"
},
{
"id": "8e281c4b-8e73-485a-8751-ad350098c30c",
"name": "Social"
}
],
"items": [
{
"id": "4030542b-a4db-40d5-bc06-ae690081fa8e",
"organizationId": null,
"folderId": null,
"type": 1,
"name": "Example",
"notes": null,
"favorite": false,
"login": {
"uris": [
{
"match": null,
"uri": "https://example.com/"
},
{
"match": null,
"uri": "androidapp://com.example.app"
}
],
"username": "[email protected]",
"password": "a-long-boring-password!",
"totp": null
},
"collectionIds": null
}
]
}
Can you please send a sample csv too
Can you please send a sample csv too
Sorry, did not check the inbox in days! Sure here is the csv and JSON format with a screenshot of Bitwarden:
Screenshot
CSV Format
,,login,Example,note-example,"custom-field-text: custom-text
custom-field-hidden: custom-field
custome-field-boolean: true
custom-field-linked: ","uri-example,uri-example-2",username,password,totp-example
JSON Format
{
"id": "6b87d50b-3ca9-44bc-bbd4-b05e0146937e",
"organizationId": null,
"folderId": null,
"type": 1,
"name": "Example",
"notes": "note-example",
"favorite": false,
"fields": [
{
"name": "custom-field-text",
"value": "custom-text",
"type": 0
},
{
"name": "custom-field-hidden",
"value": "custom-field",
"type": 1
},
{
"name": "custome-field-boolean",
"value": "true",
"type": 2
},
{
"name": "custom-field-linked",
"value": null,
"type": 3
}
],
"login": {
"uris": [
{
"match": null,
"uri": "uri-example"
},
{
"match": null,
"uri": "uri-example-2"
}
],
"username": "username",
"password": "password",
"totp": "totp-example"
},
"collectionIds": null
},
I hope these helps. Again, sorry for the late reply @yogeshpaliyal .
Hi @yogeshpaliyal, I would like to work on this issue. Can you please assign it to me?
Sure
@divyampahujaa Are you working on this?
@yogeshpaliyal Busy with university exams for the next couple of weeks. I will work on it afterwards :)
Cool, all the best for the exams.
@yogeshpaliyal Busy with university exams for the next couple of weeks. I will work on it afterwards :)
Are you working on this?
No, I am not working
Hi @yogeshpaliyal , can I work on this issue?
@HimanshuC22 sure, then I'll assign this to you. Cc @rahaaatul
I was confronted with this dilemma today when I looked for a compatible app to work on my Mac/Linux/Windows boxes. The ability to import/export to a Keepass compatible format from/to Keypass seems like it would expand KeyPass's adoption. At the very least, a CSV File. I've attached a couple of example exports (csv and xml) from KeepassXC. examples.zip
@deanaba Support for KeePassXC csv has been added in #828 Thanks for sharing this CSV
Google password csv format uses the name,url,username,password,note fields
Convert the bitwarden json to a compatible csv
- Json export from bitwarden
- Name the file bitwarden.json
- create a script.py file and
python script.py
it.
import json
import csv
# Load Bitwarden JSON file
with open('bitwarden.json', 'r') as file:
data = json.load(file)
# Prepare CSV data
csv_data = []
for item in data.get('items', []):
name = item.get('name', '')
login = item.get('login', {})
# Check if 'uris' is a list and not empty
uris = login.get('uris', [])
if uris and isinstance(uris, list):
url = uris[0].get('uri', '')
else:
url = ''
username = login.get('username', '')
password = login.get('password', '')
note = item.get('notes', '')
csv_data.append([name, url, username, password, note])
# Write CSV file
with open('google_takeout_export.csv', 'w', newline='', encoding='utf-8') as file:
writer = csv.writer(file)
writer.writerow(['name', 'url', 'username', 'password', 'note']) # CSV header
writer.writerows(csv_data)
print("Conversion completed successfully.")
A google_takeout_export.csv file will be created use that file in keypass using the google option.
Btw keypass has so potential but its useless without auto fill .