I have a quite long (several thousands of messages) chat history with one of my friends which I'd like to download and store safely on my own computer.

I did not bear this in mind from the beginning though and I therefore have no related browser plugins installed.

All of the messages are still available on Facebook - I am able to reach them all when I scroll for a while.

Is there a way to retroactively download the complete chat history?

Searching google did not provide any help.

Two options come to mind (both of them seem very laborious):

  • copy&paste all the messages manually,
  • write a script that would automate that (using e.g. Selenium).

3 Answers 3


Unfortunately your solutions might be the best ones, although if you are using Chrome, there might be a way to use the Inspect Element dashboard to pull the chat text.

Right-click on the chat window and select Inspect Element. You will see all of the rendered tags from the page, and the chat messages will appear there, all with the class:

<div class="fbChatMessage fsm direction_ltr" data-jsid="message">This is a chat message in the window</div>

To get the entire conversation, look for:

<table class="uiGrid conversationContainer" cellspacing="0" cellpadding="0" >

Then Right-Click > Copy as HTML - You can then paste the entire chat table into another file and parse it (eg using regex)

  • To OnenOnlyWalter: Is there a way to avoid the necessary scrolling after you copy the table portion? I have no experience with html, and am resorting to this after finding out that Facebook's download info option didn't actually download any of my messages. I have a few conversations that are over 8,000 messages, and I don't mind going through them once to get a good copy of them, but if I didn't have to that would be nice.
    – user39244
    Commented Apr 29, 2013 at 20:59
  • Not sure what you're asking - do you mean avoiding scrolling once you paste the HTML into another file (like a Notepad file)? If so, then you can actually use something like Python to parse the file out for you. The output from "Inspect Element" is in HTML so it's hard to read without pulling out just the message contents Commented Apr 30, 2013 at 20:48

Facebook provides a download option on the Account Settings page. The download is a file containing various information from your account, including messages and chat history.

When I download my information from Facebook, what is included in the file?

  • Your timeline information (ex: your contact information, interests, groups)
  • Content that you and your friends have posted to your timeline
  • Photos and videos that you have uploaded to your account
  • Your friend list
  • Notes you have created
  • Events to which you have RSVP’d
  • Your sent and received messages
  • Any comments that you and your friends have made on your timeline posts, photos, and other timeline content

There's also an Expanded Archive and Activity Log available. Complete details available on the Accessing Your Facebook Info page in the Facebook Help Center.

  • 1
    I haven't actually tried this but this is what I was going to suggest. I guess the downside is that you have to download EVERYTHING. If you have a lot of photos, you might have to download gigabytes of data just to get the chat history. Commented May 30, 2013 at 2:07
  • Works, but even though it has all that data, it's still missing any pictures that were sent in a message. Commented Jul 5, 2013 at 18:53

Use the red1 Mozilla Firefox addon and download all your Facebook chat conversation as a text file.

  • "is not available for your platform" (kubuntu 12) ... :(
    – Juan
    Commented Aug 17, 2013 at 0:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.