There are worse problems than having to figure out what to do with $30,000.

You might think: I have a lot of money to play with! But be careful, because it’s also a lot of money to — buzzkill alert — potentially squander.

A large windfall provides an opportunity to get your finances in order and set yourself up for the future.

These are the best investments you can make with that kind of cash.

1. Pay down debt

One of the smartest things you can do is pay down credit card debt, which has been hitting new all-time highs. The average upper-middle-income family was carrying credit card balances of $6,800 in 2016, up 13 percent from three years earlier, according to the Federal Reserve’s most recent Consumer Finance Survey.

That debt could end up costing you thousands of dollars in interest.

2. Build up your savings

Only 2 in 5 Americans have enough savings to cover an unexpected $500 expense, according to a Bankrate survey.

Financial planners recommend you carry three to six months’ worth of expenses in a high-yield savings account, to give yourself a little bit of a cushion in case you suddenly lose your job or find yourself needing a new roof.

3. Put it toward your retirement

One common regret among Americans is not saving more for when you retire. The median amount all working-age U.S. families have saved for retirement is only $5,000.

Life is expensive, incomes have been growing slowly, if at all, and many struggle to get by. But your $30,000 should give you the cover to contribute more to your employer-sponsored 401(k) plan, if you have one. The goal is to put away 10 to 15 percent of your earnings, including any match from your employer.

4. Save for college

Americans also find it challenging to save for college. Rising tuitions and financial pressures on families have helped push student loan debt to record levels.

If you have children, invest in their future by opening a 529 college savings plan or even a Roth IRA.

There are pluses and minuses to any approach. The key is to start putting money away early.

5. Open a no-fuss investment account

Thinking of your $30,000 as a ticket to earning even bigger money?

Rather than looking for the next Apple or Amazon, concentrate on building a diversified investment portfolio comprised of low-cost mutual funds and exchange-traded funds that will deliver a solid return over time.

You don’t need to buy a lot of funds to get you where you need to go. Big-time investment managers, such as Fidelity and Vanguard, offer a number of one-stop funds that do the diversifying for you.

Or, you could go with a target-date fund, which matches your exposure to stocks and bonds to your age. That is, you own more stocks when you’re younger, and more bonds when you’re older. For even more safety, find the best CD rates and add some certificates of deposit to the mix.

6. Go the DIY investing route

You could invest your $30K by building a diversified portfolio yourself. A good start is to allocate, say, 40 percent to a U.S. total stock market fund, 20 percent to an intentional equity fund and the remaining 40 percent to a total bond market fund.

You don’t need more than four or five funds, and pay careful attention to fees.

An automated financial adviser service, such as Betterment, can help you get going.