When playing in browser, A Dark Room automatically saves the game. It also allows the player to generate a save file in the form of a string of text - the link to do this is in the bottom right of the page. This text can then be inputted back into the game to restore the game state, including any useful information from previous games. Doing so will remove any data from the game's automatic saves, so if any part of the text being imported is corrupted or unusable, the game will be reset. It is suggested that this data be used for backup or changing computers.
The game data is saved in JSON-format, and that's encoded to base64 when you export a save.
You can easily cheat by decoding the export code to ASCII and changing the amount of items.
The game saves on mobile every time the fire is stoked.