At the register, 66 percent of Americans believe choosing debit over credit is the safer bet, a recent survey from Compare Cards and Lending Tree reports. This belief holds especially true for millennials: 69 percent say debit cards are as safe or safer than credit cards, while only 49 percent of Boomers and those in older generations say the same. But while debit cards can help keep you from overspending, they don't offer other key protections. "One difference between a credit card and a debit card is that if there's an unauthorized charge on your credit card, you just get a little sting. It's a hassle to straighten out. But no money is taken from you," Robert Siciliano, identity theft expert and CEO of IDTheftSecurity.com, tells Compare Cards and Lending Tree. The same isn't true for debit.

Because debit cards essentially function as electronic cash, if fraudulent charges are made, you could be liable for a lot: from $50 to everything in your account, potentially. "If someone gets a hold of your debit card information, the second they use it, depending on the nature of the transaction, your bank account will be drained," Siciliano says. "And in some cases, you can kiss that money goodbye; you got scorched." Fraud protection isn't the only advantage credit cards hold. Using credit regularly and paying off your balance in full each month helps improve your credit score, and having a good score is important if you ever want to buy a house or take out a major loan. Most credit cards also offer rewards, whether in the form of travel points or cash back, as Judge John Hodgman points out in his New York Times Magazine advice column. Hodgman sides with a husband who wants his wife to start using their joint credit card instead of her old debit card. "It's time to grow up, and growing up means loyalty programs!" the judge decrees.

While each person's financial situation is different, there are generally only a few scenarios where using an ATM card is the best choice. Below are the three times when you should opt for debit over credit.

When using a credit card would incur a fee

Sometimes there is a surcharge added to a transaction for the convenience of using credit, or a transaction will cost you in interest. This is often the case at an ATM, when paying taxes or when paying a tuition bill. "If you are accruing balances on credit cards and paying interest and fees, credit cards quickly become expensive. If you'll pay more to use a credit card due to an added fee, then using a debit card often makes more sense," Kimberly Palmer, NerdWallet's resident credit card and banking expert, explains to the site. Why pay extra if you don't have to?

When you're buying from a small business

Businesses don't set credit card minimums without reason. Often, shopkeepers must pay extra to process credit card transactions, and that can cut into profit margins for small operations and local stores. "Aside from being a conscientious patron, also be aware that if shoppers continue to use credit, said small business may increase its prices to compensate," Business Insider reports. So, if you use debit, you could indirectly help keep prices affordable.

If you're in credit card debt