This is kind of a trick question. If you have made money that the government is aware of, such as true a business venture, job, or other legitimate means, you can be sure that storing money in your safe is perfectly legal. It’s your money, and the government is aware you have it. However, if you have undeclared money sitting in your safe then yes it is illegal. You must consider that it’s not so if they never find out about it.