Ever had a bounced check? Many people have—or have done something similar. You could have written a check, used your debit card, or scheduled an automatic withdrawal from your account, only to find that you didn't have enough funds to cover the payment. The bank sends you a notice of the bad news—it could be an overdraft notice or a message that you had non-sufficient funds in your account.   

In some cases, while the bank may reject a check you have written, it will still go ahead and make the payment for you, especially if your account isn't short by too much. But then, you get hit with an overdraft fee, which now costs a median of $30 per item.

Fortunately, there are steps you can take to avoid these charges.

Say no to overdraft protection. Account holders have the right to opt in or out of overdraft protection. We recommend that you opt out, because this "protection" actually gives your bank a license to authorize overdrafts caused by using your debit card to pay for a retail store purchase or ATM withdrawal. It also authorizes them to slap you with high overdraft fees when this happens.

If you opt out, the bank will simply deny your debit transaction, which may cause you a brief embarrassment, but will save you from paying $30 overdraft fees.

There are other benefits as well to opting out. Account holders who opt out pay significantly less in total checking fees than those that opt in–$7 per month compared to $29 per month–according to a 2014 study of 2 million checking accounts at large banks by the Consumer Financial Protection Bureau.

Get an overdraft line of credit or link your savings and checking accounts. Even if you opt out of overdraft protection, your bank can still charge you overdraft fees caused by paper checks and certain recurring electronic payments. Protect against that with an overdraft line of credit or automatic transfers from a linked savings account that can add funds to your account when you have a shortfall. These options, however, can come with fees and interest charges that are more reasonable than overdraft fees.

Get a mobile banking app. Get a better handle on your bank balance. One way to do this is to download your bank's mobile banking app to your smartphone and check your balance before making debit card transactions or ATM withdrawals, to make sure you have a sufficient balance.

If there's not enough money, you can use another form of payment at the store such as a credit card or cash or use the mobile banking app to transfer funds from a savings account to a checking account. You can also use the app to check which paper checks and automatic electronic bill payments have cleared. 

Sign up for account alerts. Automate your account balance monitoring by signing up for a variety of alerts, such as a low balance alert, sent to your phone by email or text message.  

Maintain a relationship with your bank. Community banks and credit unions that have a "relationship" with you are more likely to waive overdraft fees, especially if they don't happen often, says Mike Moebs, an economist and CEO of Moebs Services, an economic research firm. A relationship means having your mortgage, credit card, or other personal or small business accounts at the same institution.

Make the balance good by the end of the day. Another worthwhile alert warns you when your account gets overdrawn. If you get one of these, banks commonly allow you to bring the account back into the black by the end of the banking day without charging you a penalty. But be aware that the "banking day" likely ends well before midnight and might be based on the Eastern time zone.  

Ask for an exception if you make a mistake. If despite all your efforts, you find you are still being charged overdraft fees, visit your bank branch and ask an officer to waive or refund the charge. Banks commonly agree if you have only a handful of overdrafts scattered over the year or have a good explanation for a cluster that happen all at once, such as complications caused by the holidays or a vacation.