Walter F. Mondale has raised almost twice as much in campaign funds during the first half of the year as his top rival for the Democratic presidential nomination, Sen. John Glenn (D-Ohio), according to reports filed with the Federal Election Commission.

Mondale, the reports said, raised $5.1 million and Glenn $2.6 million during the last six months, far outdistancing lesser known rivals for the nomination.

Mondale's appeal to contributors continued even as he lost ground to Glenn in public opinion polls during the second quarter of 1983. The former vice president raised $3.08 million in the quarter; Glenn raised $1.5 million.

Meanwhile, two other Democratic presidential hopefuls, Sens. Alan Cranston of California and Gary Hart of Colorado, were accumulating large debts, sending their campaigns well into the red, according to the reports.

Cranston has the largest debt, despite scoring well in straw-ballot contests in recent months. The FEC reports indicate that he has had trouble translating these showings into cash.

Cranston has taken out $462,092 in loans in the last three months. He owed $365,968 as of June 30, but had only $59,835 cash on hand, the reports said. He has raised $1.1 million this year.

Hart, who has fared less impressively in straw-ballot tests, owed $224,896 but had only $7,458 on hand June 30, raising questions about the financial viability of his candidacy.

Hart is negotiating for another $350,000 loan to finance a stepped-up fund-raising effort, a spokesman said. Hart has raised $830,834 this year.

Campaign manager Oliver C. Henkel, however, played down any financial problems. The campaign, he said in a prepared statement, "is positioned to grow and gain strength."

Hart, he said, raised 50 percent more during the second quarter of the year than the first, and he expects that a direct-mail solicitation effort and benefit concerts will lead to "greater advances" the rest of the year.

Mondale entered the second half of 1983 in a far stronger financial position than any of the other five announced Democratic candidates, the FEC reports indicate.

Mondale had $1.98 million on hand June 30 and owed $254,998, and Glenn had $670,717 on hand and owed $291,017, according to reports filed with the FEC on campaign finance activities for April through June.

Cranston was third in the money race, followed by former governor Reubin Askew of Florida, Hart and Sen. Ernest F. Hollings of South Carolina.

Cranston, attempting to capitalize on his straw-ballot victories, raised $688,327 during the quarter, bringing his total for the year to $1.1 million. He has spent $1.54 million, $1.1 million during the last three months.

After an impressive first quarter, Askew, a dark-horse candidate, scaled back his fund-raising activities. He raised $191,595 during the last three months, bringing his total for the year to $990,643.

Askew had $433,975 on hand June 30 and debts of $12,288.

Hollings, the other southerner in the race, improved his fund-raising position during the last three months, but still lags well behind the other contenders.

Although his report had not arrived at the FEC by late yesterday, a spokesman said that Hollings raised $452,579 during the period, spent $403,461 and has $60,467 on hand. Hollings owes $71,406, the spokesman said.