Compatibility • Parameters • Quick fixes
Open an Encrypted SQLite Database (SQLCipher)
To open an existing SQLCipher database in DB Browser, you must provide the correct passphrase and match the encryption parameters used at creation: KDF iterations, page size and integrity options. This guide walks you through the process and common fixes.
Step‑by‑step: open an encrypted DB
- Launch DB Browser (portable) on Windows 10/11.
- Choose Open Database and select your file.
- Ensure you open it in SQLCipher mode, not as a plain SQLite file.
- Enter the passphrase carefully. Avoid leading/trailing spaces and clipboard artifacts.
- If prompted, set KDF iterations and page size to the original values.
- Click OK and wait for the database to open. If it fails, see the diagnostics below.
Not sure about the parameters? Start with the defaults you used to create the DB. If unknown, try the values your app/project typically uses and test systematically.
Matching parameters: what matters
SQLCipher databases must be opened with the same core parameters used at creation. Mismatches usually trigger “wrong key” or “file is not a database”.
- KDF iterations: Higher is stronger but slower. Use the same count that was set on creation. Keep it documented.
- Page size: Must match across environments. Mixing values leads to open failures.
- Integrity/cipher options: Ensure the expected integrity (HMAC, etc.) and cipher settings are applied.
Background reading: SQLCipher basics • Performance tuning: Performance tips.
If it won’t open: quick diagnostics
- Re‑enter the passphrase manually; check Caps Lock and keyboard layout.
- Test alternate iteration counts/page size used in your project history.
- Try on another machine/version to rule out local issues.
- Check file path/permissions; move the DB to a user‑writable folder.
Detailed guides: Fix “wrong key” • Troubleshooting hub
After you open the database
- Verify schema and a few records to confirm successful decryption.
- If needed, change passphrase (rekey) to rotate credentials.
- Back up the file and record the parameters for future access.