Senator Kamala Harris announced Monday night that her 2020 campaign raised $12 million in her first two-plus months running for president, a sum that is expected to vault her into the top tier of financial competitors in the wide-open Democratic primary.

Ms. Harris, a first-term senator from California, invested heavily building an online network of donors in the two years leading up to her launch, spending millions of dollars to increase the size of her email supporter list. Her campaign said more than $6 million of her fund-raising — about half of her total — came from her digital program, including $1.1 million in the last week.

Candidates must disclose their fund-raising figures for the first quarter of 2019 by April 15, though many release them earlier in an attempt to position themselves better politically ahead of the full report.

Ms. Harris’s campaign said she had received 218,000 contributions in total and that 98 percent of her contributions were under $100. Her average donation was about $55. Her campaign did not say how much of her total those small contributions accounted for.

“A nationwide network of hundreds of thousands of grass-roots supporters has stepped up to lay the foundation for a winning campaign,” said Juan Rodriguez, Ms. Harris’s campaign manager, in a statement.

Ms. Harris has also raised money aggressively on the traditional fund-raising circuit and spent the final weekend of March dashing across California, from the Bay Area to Los Angeles, to raise as much as possible ahead of the first disclosure deadline of the 2020 race. Her campaign said only 0.55 percent of her individual donors gave the legal maximum of $2,800 — though that is still hundreds of contributors.

Earlier on Monday, Pete Buttigieg, the mayor of South Bend, Ind., announced that he had raised more than $7 million in the first quarter. Mr. Buttigieg’s campaign said he had 158,550 donors who gave an average donation of $36.35. About 64 percent of his $7 million came from contributions of less than $200.

Neither Ms. Harris nor Mr. Buttigieg disclosed how much cash on hand their campaigns currently have.

On Tuesday, senior advisers to Senator Bernie Sanders, who is widely expected to post the largest fund-raising haul this month, are scheduled to release his fund-raising figures. In emails to supporters, Mr. Sanders’s campaign has said he had nearly 900,000 contributions in the first quarter, writing in one email that donations were “about a $20 average this time.” His average donation was $27 in 2016, suggesting he has raised somewhere between $18 million and $24 million.

Ms. Harris recently rolled out a plan to give every teacher in America a substantial raise, and her campaign said on Monday that she has received 11,000 donations from educators.

A version of this article appears in print on , Section A, Page 18 of the New York edition with the headline: Small Online Donations Power Harris in the First Quarter. Order Reprints | Today’s Paper | Subscribe