How to Read an SMS Backup and Restore XML File on a Computer
What the sms and calls XML files from SMS Backup and Restore contain, how to read them as conversations on a PC and how to save texts as PDF or Excel.

How to Read an SMS Backup and Restore XML File on a Computer
SMS Backup and Restore is one of the most used Android apps for keeping text messages safe when a phone is replaced or reset. It writes two kinds of file: one for messages, usually named something like sms-20261105.xml, and one for calls, named calls-20261105.xml. Those files are meant to be restored onto a phone, so they are not pleasant to read directly. Open one in a text editor and you will see thousands of lines, each one an XML element with the message tucked inside an attribute called body.
That is a problem when you no longer have an Android phone, when you want to keep a conversation as a document, or when somebody asks you for a record of texts and calls. The answer is to read the backup with a viewer that understands its layout.
What is inside the backup
Every text message is an sms element. Its address attribute holds the other person's number, date holds the time in milliseconds since 1970, type says whether it was received (1) or sent (2), and contact_name holds the name saved on the phone, or (Unknown) when there was none.
Picture messages are mms elements, and they are more complex. An MMS is made of parts: a text part, one or more media parts such as image/jpeg, and a layout part in a format called SMIL that can be ignored. Pictures are stored inside the file as base64 text, which is why a backup with many photos can grow to hundreds of megabytes. Group messages carry several numbers in the address, separated by a tilde, with a list of addr elements that say who sent and who received.
The calls file uses call elements with a number, a duration in seconds, a date and a type: 1 for incoming, 2 for outgoing, 3 for missed, 4 for voicemail, 5 for rejected and 6 for blocked.
Worked example
The SMS Backup and Call Log Viewer has a sample made of one messages file and one calls file. Loading both together gives 7 messages, 3 conversations, 1 MMS and 4 calls.
The interesting thread is Rina Das. Three of her messages store her number as +447700900123 and one stores it as 07700900123, the same mobile written in local form. A simple viewer would show two separate conversations. Matching on the last 9 digits puts all 4 messages in one thread, with her name as the title. Her last message is an MMS with the caption East wall, near the window and a picture called crack.png, which appears inside the bubble.
The calls file adds up to a talk time of 16 minutes 51 seconds, shown as 0h 16m: a 5:12 call from Rina, a 1:35 call to Tom Baker after a missed call from him, and a 10:04 call from a number that has no saved name. In the Calls by contact table that unnamed number comes first, because the table is sorted by total talk time.
Turning texts into a document
There are three useful outputs. The printable page shows each conversation as bubbles, with your messages on the right and pictures included; print it from the browser and pick Save as PDF to get a file you can email or archive. The messages CSV puts one message per row with its date, number, direction and text, which suits filtering in a spreadsheet. The Excel workbook keeps conversations, messages and calls on separate sheets.
If you only need part of a conversation, open the printable page and choose a page range in the print dialog, or delete the rows you do not need from the CSV in your spreadsheet.
Common mistakes
Opening only one of the two files. Messages and calls are saved separately. If the call log is empty, look for the calls- file in the same backup folder and open it together with the sms- file.
Expecting the readable_date to be used. Each record also carries a text date written by the phone in its own language and zone. The viewer works from the numeric date instead, and shows it in this device's zone or in UTC, so a time may differ from the readable text if the phone was set to another zone.
Thinking photos are missing. If a backup was made without MMS attachments, the message parts are listed but hold no picture data. Make a new backup with MMS included.
Merging the wrong people. Matching on the last 9 digits is right for almost every case, but two numbers from different countries that share those digits would land in one thread. Check the number shown beside the name.
Sending private messages carelessly. A backup holds other people's words as well as yours. Share only what is needed, and if the texts are for a dispute, ask a solicitor or the court how they want them supplied.
Keeping the original
Whatever you export, keep the XML backup itself. It is the file that can be restored to a phone, and it holds details, such as the service centre and read status, that a PDF does not show.


%20Generator&c=%23991b1b&k=documents)
