Import your Aegis or 2FAS codes into KeyNesta
Published 19 September 2026. Updated 16 November 2026. About 5 minutes.
Both Aegis and 2FAS can export their whole vault as a JSON file, and KeyNesta reads both formats directly. The import is decoded on your device; the file never touches a server. Password-protected exports are supported. KeyNesta recognises an encrypted Aegis vault or a .2fas backup with a password on it, asks for that password, and opens the file in your browser. The password is used on your device and never uploaded. Switching phones rather than apps? Transfer 2FAS to a new phone covers the sync and export routes.
Read this first. Set a password on the export when the app offers one, because an export without one holds every one of your secrets in readable text. Either way, make it only on a device you trust, import it straight away, then delete the file, including any copy in a synced folder, a downloads folder or the trash. Do not email it or leave it in cloud storage.
Export from Aegis
- Open Aegis, then Settings, then Import & export, then Export.
- Choose the JSON format and leave Encrypt the vault on, then note the password you set. KeyNesta asks for it at import. If you turn encryption off instead, Aegis warns that the file will contain your secrets in plain text, and that warning is correct, so import immediately and delete the file at the end.
- Save the file somewhere you can reach from the computer running KeyNesta. Menu names may differ slightly between Aegis versions.
Export from 2FAS
- Open 2FAS, then Settings, then Backup, then export to a file.
- Set a backup password when 2FAS asks for one, and keep it to hand. You type it into KeyNesta when you import.
- 2FAS saves a file ending in
.2fas. Without a password it is plain JSON inside; with one, the accounts in it are encrypted and KeyNesta unlocks them after you enter it.
Import into KeyNesta
- Open the web app and unlock your vault.
- Choose Import from another app.
- Upload the file, or open it in a text editor and paste its contents into the Paste export data or otpauth URIs field. The file picker accepts
.json,.csvand.txt, so either rename a.2fasfile to.jsonfirst or paste its contents. - If the export has a password, KeyNesta notices and asks for it. Type it in and choose Unlock and Preview.
- Review the preview. Every account is listed, duplicates of entries you already have are flagged and skipped, and invalid rows are marked. Confirm to import; the whole batch can be undone with one tap.
What carries over
- From Aegis: issuer, account name, secret, algorithm, digits, period, HOTP counters, and groups, which become KeyNesta tags.
- From 2FAS: service name, account, secret, algorithm, digits, period and counter.
- Not carried over: custom icons and colours. KeyNesta generates its own avatars from the service name.
Afterwards
Delete the export file now, and empty the trash. It holds every one of your secrets, in readable text if you exported without a password, and you no longer need it. Then create a KeyNesta encrypted backup, or turn on sync, so the migration is the last time you ever have to do this by hand. See 2FA backup and sync.
Frequently asked questions
Can KeyNesta read an encrypted Aegis vault?
Yes. Export the vault with "Encrypt the vault" left on, pick the JSON file, and KeyNesta asks for your Aegis password, opens the vault in your browser and shows the preview. The password is used on your device and is never uploaded. An export made without encryption still works too, and either file is worth deleting once the import is done.
My 2FAS file will not upload. What now?
The web app file picker accepts .json, .csv and .txt, so either rename the .2fas file to .json, or open it in any text editor and paste its contents into the import field. Both routes work whether or not you set a backup password: KeyNesta asks for the password once it has read the file or the pasted text.
Which apps can import an Aegis or 2FAS export?
KeyNesta reads both, as this guide shows. 2FAS says its own app imports from Aegis, Raivo, Stratum and Google Authenticator, and Proton says Proton Authenticator imports from 2FAS, Aegis, Google Authenticator and Bitwarden. Check the destination app's own import list before you export, and delete the file once the move is done.
Should I export with a password?
Yes, whenever the app offers one. An export without a password holds every secret in readable text. With one, KeyNesta asks for it at import and uses it only in your browser. Either way, import straight away and delete the file, including any synced copy.
Do groups and icons carry over?
Aegis groups become KeyNesta tags. Icons and custom colours from either app are not imported; KeyNesta draws its own avatars.
Is the export uploaded anywhere?
No. The file is parsed in your browser and the entries are written into your encrypted vault on the device. If sync is on, only the encrypted result is uploaded.
Try KeyNesta free. The web app needs no sign-up.
Open the web app All platforms