WASHINGTON—President Biden said he was closing in on a decision to eliminate some student-loan debt, but stressed any loan forgiveness would be less than the $50,000-per-borrower some influential Democrats have sought.

“I am considering dealing with some debt reduction. I am not considering $50,000 debt reduction, but I’m in the process of taking a hard look at whether or not there will be additional debt forgiveness,” Mr. Biden told reporters at the White House.

Mr. Biden said he would make a decision in the next couple of weeks.

The president’s remarks come as Democrats and progressive groups are ramping up pressure on Mr. Biden to take executive action on the issue, arguing that doing so would help millions of Americans who are burdened by student loans.

Mr. Biden previously expressed skepticism about across-the-board student loan forgiveness, arguing that people who went to expensive private schools, for example, shouldn’t see their debt wiped away by the government. But in recent months, the president has warmed to the issue, administration officials and others close to the president said, as Democrats face losses in the coming midterm elections.

The president’s advisers are weighing tailoring any debt forgiveness proposal so that the bulk of the benefits go to lower-to-middle-income borrowers, according to people familiar with the administration’s internal discussions. Options include imposing an income threshold or limiting forgiveness to undergraduate loans, the people said. Blanket-loan forgiveness could benefit middle-to-upper-class professionals with advanced degrees, who tend to have large amounts of student debt, analysts have said.

The administration hasn’t yet decided how it will proceed, but the president has signaled to advisers and others that he is more comfortable with debt cancellation in the range of $10,000, the people said. Mr. Biden has previously endorsed legislation to forgive $10,000 in student debt per borrower. Because that legislation is unlikely to win enough support in Congress to pass, Democratic lawmakers have urged Mr. Biden to take executive action to wipe out debt unilaterally.

White House press secretary Jen Psaki told reporters on Thursday that Mr. Biden was considering means testing any student loan relief. “He has talked in the past about how, you know, he doesn’t believe millionaires and billionaires, obviously, should benefit, so that’s certainly something he would be looking at,” she said.

Sen. Elizabeth Warren (D., Mass.) has been a leading advocate for forgiving up to $50,000 in federal student debt per borrower. Mr. Biden has repeatedly declined to endorse that proposal, but proponents of the effort had nonetheless held out hope that he would come around to the idea. Mr. Biden made clear in his Thursday comments that he won’t back the proposal.

Democrats have argued that student-loan forgiveness could help motivate young voters and other progressives to go to the polls in November. But the issue also has the potential to anger voters who have paid off their loans, never took on debt or don’t believe the government should step in to help current borrowers.

Some Republicans have accused Democrats of using debt relief as an irresponsible play for votes.

“Dems consider forgiving trillions in student loans,” tweeted Sen. Mitt Romney (R., Utah). “Other bribe suggestions: Forgive auto loans? Forgive credit card debt? Forgive mortgages?”

Advocates of student-loan forgiveness say the move would benefit minorities and low-income Americans. Studies show that forgiving student debt could help Black borrowers, who are more likely to face long-term financial burdens from student loans.

At a meeting this week with Democratic members of Congress, Mr. Biden signaled that he was seriously considering taking action to forgive student-loan debt on a large scale, according to congressional aides and others familiar with the discussions.

“I am hopeful that he will do the right thing,” Senate Majority Leader Chuck Schumer

(D., N.Y.) said Wednesday. Mr. Schumer has advocated for Mr. Biden to pursue relief of $50,000 per borrower.

Earlier this month, the Biden administration extended through Aug. 31 the pause on payments of federal student loans. Payments and interest accrual have been suspended for borrowers with federal student loans since March 13, 2020, at the start of the Covid-19 pandemic. The U.S. has extended the pause on payments several times amid pressure from prominent Democrats to offer relief to the public.

About 40 million people owe around $1.6 trillion in federal student debt, which makes up around 90% of student debt outstanding. Borrowers with private loans aren’t eligible for the pause in payments, though some lenders and servicers have offered flexibility to borrowers who asked to suspend payments.

Earlier Thursday, the Education Department said it would cancel the loans of 28,000 student borrowers who attended a now-defunct for-profit chain of cosmetology schools, the latest move by the Biden administration to address the politically charged issue.

Write to Andrew Restuccia at andrew.restuccia@wsj.com