SPRINGFIELD — A nonprofit with the technology to analyze criminal records nearly automatically will help the county that includes Chicago clear tens of thousands of convictions for marijuana possession as Illinois gets set to allow the recreational sale of the drug.

Code for America will provide a digital system to tackle the task at no taxpayer cost and in a fraction of the time it would take bureaucrats to slog through decades of cannabis arrests and convictions, Cook County State’s Attorney Kimberly M. Foxx said at a news conference in Chicago on Tuesday.

California is using the organization’s Clear My Record program to erase tens of thousands of records in four of its counties, including Los Angeles County.

Possession of 30 grams or less of marijuana will be legal in Illinois starting Jan. 1. The law, which was signed in June, also recognizes that for decades people caught with small amounts of pot received stiff fines, possible jail time and criminal convictions that dogged them for life.

Illinois is the 11th state to legalize recreational marijuana, and as the legalization movement grows, so too does the debate about the damage inflicted by the government’s war on drugs, particularly on minority communities that were disproportionately affected.

Foxx, who is black, has been vocal about the role prosecutors must play in repairing the harm and she began clearing pot convictions in the spring, before recreational marijuana was signed into law in June.

“It is prosecutors who have to be at the table to ensure that we’re righting the wrongs of the past,” Foxx said. “Conviction relief is not only a critical part of righting the wrongs on the war on drugs, it is a recommitment and a statement of our values, that a low-level marijuana conviction does not mean that someone is a threat to public safety.”

In Illinois, about 770,000 arrests and convictions, representing about 314,000 people, must be automatically expunged. Lawmakers streamlined the process but it would take an inestimable number of staff hours to review the records by hand. “It would be incredibly onerous,” Foxx said.

Foxx said her office is working with the State Police to determine how many conviction records the county must process. A State Police spokesman did not immediately respond to a request for comment. Foxx’s staff will then initiate court calls at which they will ask a judge to expunge groups of eligible cases — essentially, any that didn’t involve violence.

Convictions from 2013 to Jan. 1, 2020, must be expunged by Jan. 1, 2021. Those from 2000 through 2012 must be cleared by January 2023 and those prior to 2000 must be off the books by January 2025.

Jennifer Pahlka, founder and executive director of San Francisco-based Code for America, which provides digital programs for a variety of government services, said she began Clear My Record after California legalized recreational marijuana in 2016.

It was initially an online platform for people seeking marijuana conviction expungements to avoid a paper chase. She said 12,000 people successfully navigated the original process, but it seemed too slow.

“Why have all of those steps? It’s already the law that this is no longer a crime,” Pahlka said. “Let’s get this off the person’s record so that they can apply for jobs, get housing, get student loans, all of the things that they’re held back from.”

Code for America relies mainly on philanthropic giving from donors including Google, the Knight Foundation, Luminate, Microsoft and Kaiser Permanente.

The Cook County project marks the first time Clear My Record will leave California, where it’s in the process of clearing 75,000 marijuana conviction records in Los Angeles, Sacramento, San Francisco, and San Joaquin Counties.

The Clear My Record software, loaded with the Illinois law’s parameters allowing for record-clearing, analyzes digitized records, identifies those eligible and can produce a court-ready record.

It will also produce reports on convictions for possession or delivery of 30 to 500 grams of the drug, which can be expunged under the law in a more involved process that the defendant must initiate.

State’s attorney’s staff will still have work to do. Eligible records must be reviewed for accuracy. And Foxx said an untold number of records dating back decades are still on paper, requiring data entry.

“From a social cost, the ability for people who we want to be taxpaying citizens to be able to find employment and housing and meaningfully contribute to society is really important,” Foxx said. “And we’ll use those resources (for expungement) and not for dealing with these cases elsewhere throughout the justice system.”