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.
- Start FastoNoSQL, and open a new connection. Select “leveldb”.
- Select the “leveldb” folder that you previously copied.
- Click OK to open the database connection.
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.
- Right-click the database connection and select “Load content of database”. Notice the “Search…” box below – we will find our save using this feature.
- Enter the number of keys and click OK.
- A large number of entries will appear. We will filter these out to find the saves.
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).
- Edit the entries found after entering the search string, and save the contents of the “Value” field. These are your game saves!
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!
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?
LikeLike
I’ve never seen that error before. Unfortunately I don’t know of any solution for that apart from maybe doing a disk check.
LikeLike
Oy, it is our software
LikeLike
Thank you! This saved me a lot of time!
LikeLike
when I go to \AppData\Local\Google\Chrome\User Data\ there is no default folder there?
LikeLike
That’s odd. Have you tried navigating to chrome://version/ and looking at the profile path there?
LikeLike
yeah i did and i found it after thanks, but after following all the other steps in nofastSQL i didnt find the cookie clicker hexidecimal key string? any ideas why??
LikeLike
It may be in the HTTPS save slot. Try searching with this line:
\\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
LikeLike
i found the cookie clicker hexidecimal string and made it into text and tried loading it but in cookie clicker it said error loading from a future verson? i tried on http and https versions??
LikeLike
Have you tried importing into the beta version?
LikeLike
i did and it still says error you are trying to load from a future version??
LikeLike
That’s odd. Unfortunately I can’t think of much else to try right now. If you’re interested you can email me with the save data and I can see what I can do.
LikeLike
how can i email u the save data?
LikeLike
You can send it to me at ginbot86@gmail.com and just put the textual save data in the email.
LikeLike
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???????????!!
LikeLike
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)”.
LikeLike
where do find the database keys?
LikeLike
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
LikeLike
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…
LikeLike
That’s unfortunate… it seems like Windows doesn’t have this feature turned on by default anymore.
LikeLike
Hi, I tried recovering the save, but my key value does not look like a normal save file text. I have tried different view outputs, but none look like it.
My view: https://imgur.com/a/nBGNaiQ
LikeLike
Looks like the string is encoded as escaped hexadecimal. Perhaps try this tool to convert it back to plain ASCII: https://codepen.io/kamakalolii/pen/RKNoMr
LikeLike
Hi, yea, I went to an online “hex to text” converter and this gave me the correct text string required and I got my save back! Thank you.
LikeLike
Very glad to hear it!
LikeLike
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!
LikeLike
Once you have copied the LevelDB database, you can continue the recovery on the new computer.
LikeLike