Mayor de Blasio likes using taxpayer money to create “good-paying” local jobs — unless he’s campaigning.

De Blasio’s re-election bid has spent $1.27 million at businesses headquartered or located outside the five boroughs, according to campaign finance records through Aug. 28.

That’s nearly half of roughly $2.7 million shelled out by the campaign, including outstanding bills, since de Blasio took office in 2014.

The money went toward office technology, political consultants, polling and other services sold by companies as far away as San Francisco and as close as Yonkers.

Revolution Messaging, an agency in Washington, DC, has been paid $268,130 since last September for digital work, Web site development and online advertising consulting.

That company was founded by members of President Barack Obama’s 2008 campaign and Sen. Bernie Sanders’ 2016 bid, providing “authentic digital storytelling for progressive causes,” according to its Web site.

De Blasio’s campaign paid ADP Payroll Solutions, based in El Paso, Texas, $228,372 between March 2016 and this past August, records show.

The campaign also splurged while fund-raising outside the city, spending $168,185 on hotels, catering and clubs nationwide.

In June, de Blasio outlined a 10-year plan to create jobs paying more than $50,000 a year using at least $1.35 billion in public funds.

“Some believe in supply-side economics,” de Blasio said then. “Others, like myself, believe the role of government is to make smart investments that build a better society, and that we have an opportunity in this city to shape the economy of the future.”

The mayor’s re-election campaign has received $2.87 million in public matching funds so far.

De Blasio campaign spokesman Dan Levitan dismissed questions about the out-of-town spending, including $21,180 to New Jersey-based Oxford Health Insurance.

“The vast majority of our resources are used communicating directly with New Yorkers, and the vast majority of our campaign team — including consultants — lives and works in New York City,” Levitan said. “To suggest we are spending inappropriately by using . . . a major New York health insurer is beyond silly.”

De Blasio’s rival, Assemblywoman Nicole Malliotakis (R-SI), spent only around 30 percent of her campaign cash outside the city.

Support the Party