Open SQLite on Android thumbnail

How to Open a SQLite File on Android

You’ve got a .db file on your Android phone. Maybe someone sent it to you on WhatsApp or email. Maybe you exported it from an app, or copied it from a computer. Now you want to see what’s inside, and your phone just says “Can’t open file.”

Android doesn’t include a SQLite viewer. But you don’t need to install one either. This guide shows the quickest way to open a SQLite file on Android using the browser you already have. It also explains where Android apps keep their databases, why you usually can’t reach them, and what developers can do instead.

The quick way: open it in Chrome

This works on almost any Android phone or tablet made in the last several years.

  1. Make sure the .db file is on your phone. Downloads is the easiest place for it.
  2. Open Chrome (or Firefox, Edge or Samsung Internet).
  3. Go to our free online SQLite viewer.
  4. Tap Choose file.
  5. Android opens its file picker. Tap Browse or the menu icon if needed, then find your file in Downloads or wherever you saved it.
  6. Tap the file. The tables appear on the screen.

That’s it. Tap any table to see its rows. Swipe sideways on the grid to see more columns. Tap a cell to read its full value in a pop-up.

The file is read inside your phone’s browser. It isn’t uploaded. That’s worth knowing if the database holds messages or contacts.

Can’t see the file in the picker?

Android’s picker sometimes hides files it doesn’t recognise. Try these fixes:

  • Tap the menu (three lines or dots) in the picker and choose Downloads or Internal storage.
  • Look for a Show internal storage option in the picker menu on some phones.
  • Use the Files by Google app to move the file into Downloads first.
  • If the file came from WhatsApp or Gmail, save it to your device first rather than opening it straight from the chat or email.

How to use the viewer on a small screen

Phones have less space, so the layout adapts. Here’s how to get around:

  • Tables list: at the top of the screen. Tap a table name to open it.
  • Data grid: swipe left and right to see columns. The row number stays pinned on the left.
  • Search: type into the box above the grid. It checks every column.
  • Sort: tap a column header. Tap again to reverse.
  • Full values: tap a cell. Long text and JSON open in a readable pop-up with a Copy button.
  • Run SQL: tap the tab, type a query, and tap Run query.

For a detailed tour of what each screen shows, read how to view a SQLite DB file.

Exporting data on Android

Once you find what you need, tap Export CSV or Export JSON. The file goes into your Downloads folder. You can open the CSV in Google Sheets, Excel for Android, or share it by email.

Want a smaller export? Run a query in the Run SQL tab that returns only the rows you need, then export that result. Our SQLite to CSV guide explains the options.

Where Android apps keep their databases

Most Android apps store data in SQLite. The files live in each app’s private folder:

/data/data/<package name>/databases/

For example, an app called com.example.notes would keep its database somewhere like:

/data/data/com.example.notes/databases/notes.db

You’ll often see extra files next to it with the same name plus -wal and -shm. These hold recent changes.

Why you can’t open these directly

Android protects each app’s private folder. Other apps, including file managers and browsers, can’t read it. That’s a security feature. It stops one app from reading another app’s data.

So on a normal, unrooted phone, you can’t just browse to /data/data/ and grab a database. You need one of the routes below.

Ways to get an app’s database

1. Use the app’s own export or backup

Many apps offer an export or backup option in their settings. Some save a .db file you can open. Others use their own format. Check the app’s settings first. It’s the simplest and safest route.

2. Developers: Android Studio

If it’s your own app, or any app built as debuggable, Android Studio has a built-in tool for this. Open View, then Tool Windows, then App Inspection, and choose the Database Inspector tab. You can browse tables and run queries on a running app.

You can also use the Device Explorer in Android Studio to download the database files from the app’s folder on a debuggable build.

3. Developers: adb and run-as

For debuggable apps, you can copy the database with adb from a computer:

adb shell run-as com.example.notes cat databases/notes.db > notes.db

This works only for debuggable builds. It won’t work for apps installed from the Play Store in release mode.

4. Rooted phones

On a rooted phone, a root file manager can reach /data/data/. Rooting has real security and warranty downsides, so it isn’t something to do just to read one file.

Common Android databases people look for

DatabaseWhat’s insideCan you open it?
mmssms.dbText messagesOnly with root or a backup that includes it
contacts2.dbContacts and call logOnly with root or a suitable backup
msgstore.db (WhatsApp)WhatsApp chatsLive copy needs root. Backups are encrypted.
Your own app’s .dbYour app’s dataYes, with Android Studio or run-as
An exported .dbWhatever the app exportedYes, in the online viewer

WhatsApp is the most common question. Its backups end in .crypt14 or .crypt15 and are encrypted. Our WhatsApp msgstore.db guide explains what you can and can’t do.

A worked example: reading an exported notes database

Say a notes app lets you export a backup, and it gives you a file called notes_backup.db. Here’s how to read it on your phone.

  1. Save the file to Downloads.
  2. Open the viewer in Chrome and tap Choose file.
  3. The tables list shows android_metadata, room_master_table, notes and folders. The notes table has the most rows, so start there.
  4. Tap notes. You see columns like title, content, folder_id and updated_at.
  5. The updated_at values are 13-digit numbers, so they’re milliseconds.
  6. Open Run SQL and type:
SELECT n.title, f.name AS folder,
  datetime(n.updated_at / 1000, 'unixepoch') AS updated
FROM notes n
LEFT JOIN folders f ON f.id = n.folder_id
ORDER BY n.updated_at DESC;
  1. Tap Run query, then Export CSV.

You now have every note with its folder and a readable date, in a file you can open in Google Sheets. Table and column names will differ between apps, but the steps stay the same.

Reading Android dates

Android apps usually store dates as milliseconds since January 1, 1970. You’ll see 13-digit numbers like 1727308800000. Convert them in the Run SQL tab:

SELECT datetime(date / 1000, 'unixepoch') AS sent, body
FROM sms
ORDER BY date DESC
LIMIT 20;

If the number has 10 digits, it’s already in seconds. Leave out the division.

Android Room databases

Many modern apps use Room, Google’s library on top of SQLite. You’ll recognise it by a table called room_master_table. Ignore that and android_metadata. The real data is in the other tables, usually named after the app’s features.

Opening a .db file with a computer instead

Sometimes a bigger screen is easier. Send the file to your computer by USB, email or cloud storage, then open it there. Our guides for Windows and Mac walk through it.

Troubleshooting on Android

“Not a SQLite database”

The file may be encrypted or compressed. WhatsApp .crypt files are the classic example. See our file is not a database guide.

The page is slow or crashes

Phones have less memory than laptops. Very large files, over a few hundred megabytes, may not fit. Close other apps and tabs, or open the file on a computer.

The file shows 0 bytes

The copy didn’t finish, or you copied a placeholder. Copy the file again and check its size in your file manager.

Tables are empty

If there was a -wal file next to the database, copy it too. Recent data often waits there until the app writes it into the main file.

Want the technical detail? See the official SQLite article on SQLite as an application file format.

Frequently asked questions

Do I need an app to open SQLite files on Android?

No. A browser-based viewer works fine. Apps exist, but many ask for broad permissions. The browser route avoids that.

Can I edit a SQLite file on my phone?

Yes. Use UPDATE or DELETE statements in the Run SQL tab, then tap Download .db to save a changed copy. The original stays untouched.

Can I open SQLite files on an Android tablet?

Yes, and the larger screen makes it easier. The steps are the same.

Is it safe?

The viewer reads your file locally in the browser. Nothing is sent to a server. Just be careful where you got the file from.

Summary

To open a SQLite file on Android, save it to your phone, open our free online SQLite viewer in Chrome, and tap Choose file. You’ll see every table instantly, with search, sorting and CSV export. App databases in /data/data/ are protected, so use the app’s export feature or, for your own apps, Android Studio’s Database Inspector. For a full overview of every method, see how to open a SQLite file.

Similar Posts