CSV import/export • Encoding • Data types

Import and Export CSV in DB Browser (SQLCipher)

Import CSV into an encrypted database or export tables and query results to CSV with predictable encoding and delimiters. This guide covers common pitfalls, data type mapping and large file strategies on Windows.

Import CSV into an encrypted database

  1. Open your encrypted database (how to open) and choose Import → Table from CSV.
  2. Pick the CSV file and set delimiter (comma, semicolon, tab), quote and encoding (UTF‑8 recommended).
  3. Review detected headers and map columns to target names and types (INTEGER, REAL, TEXT, BLOB). Add constraints if needed.
  4. Run the import and verify row counts. Spot‑check a few records and special characters.
Large files? Split into chunks, or import into a staging table and then transform with SQL for better control.

Trouble importing? See Troubleshooting for encoding and delimiter issues.

Export a table or query to CSV

  1. Select the table you want to export, or run a SELECT query to produce the desired result set.
  2. Choose Export → Table (or Query) to CSV, set delimiter and quoting, and pick UTF‑8 unless a consumer requires another encoding.
  3. Save the file and validate it in a text editor (headers, separators, sample rows).
Dates and times: prefer ISO‑8601 (YYYY‑MM‑DD, HH:MM:SS) for predictable parsing in other tools.

Data types, NULLs and cleaning

Need structured examples? See Useful SQL/PRAGMA commands for post‑import checks.

Performance and large files

More guidance: Performance tips.

Next steps

Page last modified: --
|