Technically possible in some cases, but almost always a bad idea. Here's why.
No standard consolidation loan or balance transfer card will let you combine federal student loans and credit card debt into one product. They're fundamentally different types of debt with different rules. However, some personal loan lenders will let you use loan proceeds to pay off both student loans and credit cards separately, effectively consolidating everything into one personal loan payment.
The problem is what you lose by moving federal student loans into a private consolidation loan. Federal student loans come with protections that disappear the moment you refinance them privately: income-driven repayment plans (which cap payments at a percentage of your income), Public Service Loan Forgiveness eligibility, deferment and forbearance options, and potential forgiveness after 20 to 25 years on income-driven plans.
If you lose your job, federal loans offer safety nets. A private consolidation loan does not. It's due every month regardless of your employment status.
The interest rate math also rarely works in your favor. Federal student loan rates for existing borrowers range from about 3% to 7%. Credit card rates range from 20% to 28%. A personal consolidation loan might come in at 10% to 15%. You'd be raising the rate on your student loans while lowering the rate on your credit cards. The net benefit depends on how much of each type you have, but it's often a wash or even negative.
The better approach: handle them separately. Use a balance transfer card or consolidation loan for the credit card debt (where the interest rate savings are dramatic). Keep your federal student loans on an income-driven plan or standard repayment. If you have private student loans at high rates, those are worth refinancing separately through student loan refinancing companies like SoFi, Earnest, or Splash Financial.
Mixing debt types into one product feels simpler, but simplicity isn't worth losing federal loan protections.