Supreme court Chief Justice John Roberts has urged federal judges to promote public confidence in the judicial system, while warning that Americans have come to “take democracy for granted”.

In his annual report on the state of the judiciary, the George W Bush-appointee, who will preside over Donald Trump’s impeachment trial in the Senate, said civic education had “fallen by the wayside”.

“In our age,” he wrote, “when social media can instantly spread rumour and false information on a grand scale, the public’s need to understand our government, and the protections it provides, is ever more vital.”

Roberts did not mention Trump but his statement was widely interpreted as part of an ongoing effort to shield the judicial branch from executive harassment.

The president and the chief justice have clashed before. In November 2018, Roberts issued a striking rebuke over the president’s criticism of a judge who blocked an asylum order.

“We do not have Obama judges or Trump judges, Bush judges or Clinton judges,” Roberts said.

Trump dismissed Roberts’ comments, and blamed the judges for “bedlam and chaos”.

Roberts, appointed by a Republican, is by any measure a conservative but he has emerged as something of a swing vote on a supreme court tilted right under Trump.

In his 2019 report, he said: “We should celebrate our strong and independent judiciary, a key source of national unity and stability.”

He also urged his colleagues on the bench to “reflect on our duty to judge without fear or favor, deciding each matter with humility, integrity and dispatch”, and said “we should each resolve to do our best to maintain the public’s trust that we are faithfully discharging our solemn obligation to equal justice under law”.

Roberts drew attention to efforts to give the public better access to judicial reasoning. Without mentioning him by name, he referred to the Merrick Garland, the judge denied a supreme court place by Senate Republicans in 2016. Garland, Roberts said, has spent two decades “quietly volunteering” at an elementary school.

“I am confident that many other federal judges, without fanfare or acclaim, are playing similar selfless roles throughout the country,” Roberts wrote.

The judiciary, he said, “has an important role to play in civic education, and I am pleased to report that the judges and staff of our federal courts are taking up the challenge”.