Tutorial: Recovering Cookie Clicker saves from an offline installation/backup of Google Chrome

Update (August 29, 2018): Turns out cleaning out your cookies/cache will erase your Cookie Clicker save. Who would’ve thought…

Cookie Clicker saves: You don’t realize the importance of saving your progress until you lose your save data. A few days ago I opened Chrome to my always-running instances of Cookie Clicker, but found that all of my progress was deleted (and it was showing a “Don’t forget to back up your save” message just to add insult to injury).

My heart sank when I realized that one of my runs, over three years old, had suddenly vanished into thin air. I tried restoring Google Chrome’s data via a Shadow Copy; no dice. I tried using my Windows Home Server 2011 backups, but realized that it would take over an hour to restore my Chrome folder. After much frustration, I decided to retrieve and examine Chrome’s Local Storage folder and see whether I could retrieve my save files that way – and it worked! Here’s how to recover your own Cookie Clicker saves…

Retrieving an older version of Google Chrome’s data folder

If you have Shadow Copy (aka Previous Versions) enabled, you may be in luck if the restore point(s) available have intact game save information. If you have an offline backup solution, that may be usable as well. If you have neither, you could try it on your current Chrome installation but your chances of recovery are much slimmer.

For Windows, Google Chrome’s default Local Storage folder located at: %USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Local Storage

There will probably be a large number of files ending in .localstorage and .localstorage-journal – these are unlikely to contain your saves, and if they are present, they will be many months out of date; Google has begun storing websites’ local storage in a LevelDB database. The database in question is stored in a folder called leveldb.

If you are attempting to retrieve the data from a current Chrome installation, close Chrome before continuing.

Copy this “leveldb” folder to another (safe) location as to avoid any accidental overwrite of the database while trying to recover the game saves. Download and install the FastoNoSQL database browser software (it’s a trial, but for our purposes it will do just fine – just follow the registration instructions and you can whip up a temporary email address if you need to).

Browsing the LevelDB database

When FastoNoSQL is opened for the first time, the Connections window will appear. Click the “Add connection” button (it looks like a green button with a + symbol on it); even though we’re just browsing some database files, it’s considered to be a “connection” to the database. Select “LevelDB” and choose the folder that holds the “leveldb” folder that was previously copied.

Once the database is opened, note the number of database keys (in my case it was 1212), right-click the “default” database in the Explorer tree on the left-hand side of the FastoNoSQL window, and select “Load content of database”. Enter the number of keys previously noted into the “Keys count” field, then click OK.

In the “Search…” box, enter this text (select all the text in this box):

\\x5f\\x68\\x74\\x74\\x70\\x73\\x3a\\x2f\\x2f\\x6f\\x72\\x74\\x65\\x69\\x6c\\x2e\\x64\\x61\\x73\\x68\\x6e\\x65\\x74\\x2e\\x6f\\x72\\x67\\x00\\x01\\x43\\x6f\\x6f\\x6b\\x69\\x65\\x43\\x6c\\x69\\x63\\x6b\\x65\\x72\\x47\\x61\\x6d\\x65

This cryptic-looking text is a hexadecimal-escaped version of the string _https://orteil.dashnet.org, an SOH (Start of Header) character, and CookieClickerGame.

If your saves are found, you will see one or two entries, depending on whether or not the normal and/or Beta saves are present. The first entry will be the normal version of Cookie Clicker, and the second one, with a slightly longer key (ending in “\x42\x65\x74\x61”) is the for the Beta. Right-click the desired entry and choose “Edit…” to view the game save data. Copy the contents of the “Value” field into a text editor (Notepad, etc.), and delete the very first character before “Mi4w” – this is an SOH (Start of Header) character and we don’t need it to restore the game save. Save this text file so you have a backup of your game save, and import the file into Cookie Clicker (either by copy-pasting the text or using the “Load from file” button).

The game save should look like this (look for the bolded characters to ensure the game save data is intact):
Mi4wMDQ1fHwxNTI [... text omitted ...] OkwoDCgAR8%21END%21

If everything works out, your Cookie Clicker game save should be restored from the brink of destruction!

31 thoughts on “Tutorial: Recovering Cookie Clicker saves from an offline installation/backup of Google Chrome

  1. Trying this out now, but can’t get it to work…
    When trying to connect to the LevelDB object, I keep getting an error about “Corruption: no meta-nextfile entry in descriptor”.

    I figured this might have something to do with Chrome not being fully closed while I did my copying; so I’ve tried it a few times, but no luck so far.
    Any ideas?

    Like

  2. i can’t seem to get it past the load content of databases bit no matter which number of keys i put in?
    what would my key numbers be???????????!!

    Like

    • Assuming Google Chrome’s database layout hasn’t changed, the database key count should be visible right before you select “Load content of database”, like “default (0/1234)”.

      Like

  3. This was an incredible ride, especially since I’m quite inexperienced with computers in general. But it actually worked! I can’t believe it! Thank you so, so much

    Like

  4. I went to C:\Users\MyName\AppData\Local\Google\Chrome\User Data\Default, opened the properties of LocalStorage and there are no older versions at all…

    Like

  5. Hello,

    I’m trying to copy the local storage from old computer to new computer.
    And I have question while reading your instruction.
    I have lack of knowledge about computer. Please inform me.
    “Browsing the LevelDB database” This section that where you have to download software and do stuff, so.. is this going to be on the new computer or old computer?
    So far, I’ve copied levelDB folder to my USB.
    Now is that software section a continuing step on the old computer? Or do I install software on new computer to recover the data? I’m so lost.
    I don’t have much time left before my old computer go trash. Hope you answer soon.
    Thank you!

    Like

  6. Hii, I followed this tutorial and it seemed to work out from start to aalmost finish. I got the code and stuff it all went well but when I put it into cookie clicker it reverts me back to 0 cookies, 0 buildings, all that. There were no other keys I could find and I’m horrified this might mean my save is gone forever. Any thoughts?

    Like

    • Try the http version of the search string:
      \\x5f\\x68\\x74\\x74\\x70\\x3a\\x2f\\x2f\\x6f\\x72\\x74\\x65\\x69\\x6c\\x2e\\x64\\x61\\x73\\x68\\x6e\\x65\\x74\\x2e\\x6f\\x72\\x67\\x00\\x01\\x43\\x6f\\x6f\\x6b\\x69\\x65\\x43\\x6c\\x69\\x63\\x6b\\x65\\x72\\x47\\x61\\x6d\\x65

      I was getting the same result of almost working but no save until I tried this. On twitter Orteil said some server changes force https instead of http now so if your save was on http it will be in the above string’s entry. Good luck!

      Like

  7. Hi Thanks, for this. It seems a recent change forces the https version of the site (per Orteil’s twitter), I didn’t realise I was on the http site, my save is just 10 years old so that’s the way it’s been. I was able to just take your string and cut the s (\\x73) from the start of the search string (after trying the https version to no avail and finding the info about http vs https).

    Like

    • Thanks for the update. I was about to mention clicking the padlock icon next to the version number in the lower-left corner of Cookie Clicker, but testing that revealed that the HTTPS version is forced on now.

      Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.