Hamsters will generally eat anything. From collared greens, to lean meat and fish, their diet is really only restricted by what you feed it. Generally stay with the store bought mixtures, as they tend to provide the required proteins and minerals your pet needs to remain healthy. Use other foods only as a supplement to your pet's primary diet. Be absolutely certain to never, under any circumstances, give the following foods and/or liquids to your pet, as they can cause your pet to get very ill, or even kill it.
Avoid Alcoholic Beverages.
Alcohol can kill your pet hamster very quickly. You should not even try to give it a couple of drops of alcohol "just as a joke." This is very serious, and if you love your pet, you will avoid alcohol at all costs. Avoid Pickles.
Pickles are yet another killer of hamsters. Actually, anything vinegar-based, such as pickles, will cause your hamster to suffer a quick death. Avoid Sticky Candy.
Gum, gumballs, toffees, and caramels should all be avoided. These can stick in the hamster's pouch causing drooling, but can also get stuck in the throat and cause suffocation. Avoid Hard Candy.
Such as lollipops, hot fireballs, sourballs etc. These can get lodged in your hamster's throat and cause suffocation. Avoid food that may have been touched by other animals.
Any food that may have been touched by other animals, such as dogs or cats, or any food that has been left out uncovered should not be given to your hamster. Food touched by other animals may have been urinated on, which is poisonous to your hamster. Food left uncovered can have bacteria on it that can cause your hamster to get sick. Avoid Cheeses.
Although cheese is a good source of protein, and your hamster will gobble it up quickly, it can lead to very smelly feces being left in the cage. This will cause you to have to clean the cage more frequently. Avoid Citrus Fruits.
Although hamsters love fruits and vegetables, citrus fruits such as oranges, tangerines, grapefruit, lemons and lime, should all be avoided. Citrus fruits contain citric acid, which can make your hamster very ill or worse. Do Not Feed Your Hamster Foods that are meant for other animals.
Rabbit foods, for example, aren't very good for your hamster. Rabbits have a lower requirement for protein, and therefore, their food isn't actually good for your hamster. You should also keep in mind that some pet foods contain different ingredients that are specific to the type of pet that the food is intended for, and some of those ingredients can be harmful to your hamster.
One thing to keep in mind is that just because your hamster CAN eat almost anything, doesn't mean that it SHOULD. Meats and fish, although readily accepted by hamsters, can be a source of harmful bacteria that can make your pet ill. For the most part, it's best that you stick with the store bought mixtures.