Where Are iPhone Text Messages Stored?
The iPhone sms.db file in computer backups and on device, and how it differs from the Mac chat.db.
Last updated
iPhone texts live in sms.db: on device at /var/mobile/Library/SMS/sms.db (invisible without jailbreak) and in every computer backup as a hash named file (3d0d7e5f...) under the MobileSync Backup folder for your Mac or PC. Attachments travel separately from the database rows.
Guides constantly mix this up with ~/Library/Messages/chat.db, which is the Mac Messages app's own copy of synced conversations, not the iPhone backup. Reading the backup copy needs an unencrypted backup (or the password and a tool), and Terminal may need Full Disk Access to even list the Backup dir.
Where iOS stores this, by platform
/var/mobile/Library/SMS/sms.db
Live SMS, MMS and iMessage rows plus shm/wal sidecars, Attachments/ and Drafts/ nearby. Not browsable on stock iOS and exposed to no public API; copying needs jailbreak plus SSH. Use a computer backup instead.
~/Library/Application Support/MobileSync/Backup/[UDID]/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28
The sms.db copy inside Finder backups (stable SHA1 filename; UDID folder varies). Readable with sqlite on unencrypted backups. Do not confuse with ~/Library/Messages/chat.db, which is the Mac Messages local copy.
%APPDATA%\Apple Computer\MobileSync\Backup\[UDID]\3d\3d0d7e5fb2ce288813306e4d4636395e047a3d28
Same hash named sms.db copy inside iTunes backups. Encrypted backups need the password or a dedicated tool to read. Attachments back up separately from message rows.
Frequently asked questions
What is the difference between sms.db and chat.db?
Location tells meaning. The hash named file under MobileSync/Backup is the iPhone backup copy; ~/Library/Messages/chat.db is the Mac Messages app's own synced store. Same schema family, different devices.
Can I read iPhone texts without jailbreaking?
Yes via an unencrypted computer backup: open the hash named sms.db with any sqlite browser. Messages in iCloud syncs message content separately and is not a file copy you can browse.
Notice an outdated path? Let us know.