Jared Kushner was hardly a household name outside the rarefied world of Manhattan’s moneyed elite when his father-in-law, Donald Trump, began his quixotic presidential campaign.

But by Election Day, he emerged as “Donald Trump’s campaign savior” through his connections to tech giants from Silicon Valley and savvy use of social media that they taught him, a new profile revealed Tuesday.

“And he did so in a manner that will change the way future elections will be won and lost. The traditional campaign is dead, another victim of the unfiltered democracy of the Web — and Kushner, more than anyone not named Donald Trump, killed it,” wrote Steven Bertoni in an interview with Kushner for the Dec. 20 issue of Forbes magazine.

Kushner, 35, a child of privilege who married Trump’s daughter Ivanka, immersed himself in Team Trump starting last November after witnessing a raucous, packed rally in Springfield, Illinois, on a Monday night.

“People really saw hope in his message,” he told the magazine.

“They wanted the things that wouldn’t have been obvious to a lot of people I would meet in the New York media world, the Upper East Side or at Robin Hood [Foundation] dinners.”

He headed up the campaign’s “secret data operation … like a Silicon Valley startup,” and propelled the gaffe-prone candidate to an unlikely victory, according to Forbes.

“It’s hard to overstate and hard to summarize Jared’s role in the campaign,” billionaire Peter Thiel, the only Silicon Valley big to publicly back Trump, told the magazine.

“If Trump was the CEO, Jared was effectively the chief operating officer,” Thiel added.

“Jared Kushner is the biggest surprise of the 2016 election,” said Eric Schmidt, the former Google CEO. “Best I can tell, he actually ran the campaign and did it with essentially no resources.”

With Kushner on board, the Trump campaign “delved into message tailoring, sentiment manipulation and machine learning,” according to Forbes.

“I helped facilitate a lot of relationships that wouldn’t have happened otherwise,” Kushner said.

“People were being told in Washington that if they did any work for the Trump campaign, they would never be able to work in Republican politics again. I hired a great tax-policy expert who joined under two conditions: We couldn’t tell anybody he worked for the campaign, and he was going to charge us double.”

When Kushner first got involved, the Trump campaign was a shoestring operation — with little more than former campaign manager Corey Lewandowski, spokeswoman Hope Hicks and a few others operating with few resources.

Kushner turned it into “an actual campaign operation,” and was soon pulling together a speech and policy team, handling his father-in-law’s schedule and minding the books.

“Donald kept saying, ‘I don’t want people getting rich off the campaign, and I want to make sure we are watching every dollar just like we would do in business,’ ” Kushner said.

It helped that he knew the right people, including co-investors in Cadre, an online marketplace for big real estate deals Kushner helped launch, including Thiel and Alibaba’s Jack Ma along with Kushner’s younger brother, Josh, a venture capitalist who also co-founded the $2.7 billion insurance firm Oscar Health.

“I called some of my friends from Silicon Valley, some of the best digital marketers in the world, and asked how you scale this stuff. They gave me their subcontractors,” Kushner said.

“I called somebody who works for one of the technology companies that I work with, and I had them give me a tutorial on how to use Facebook micro-targeting.”

His efforts, for example, led to the Trump campaign going from selling $8,000 worth of “Make America Great Again” hats a day to $80,000.

That generated revenue, expanded the visibility of Trump’s message and proved that the strategy worked.

Kushner then spent $160,000 to promote a series of simple policy videos with Trump talking straight into the camera that generated more than 74 million views.

His work impressed Trump to the point that he emerged as the candidate’s most trusted adviser, the one with whom the candidate would speak into the wee hours of the morning on his campaign jet.

“Every president I’ve ever known has one or two people he intuitively and structurally trusts,” said ex-Secretary of State Henry Kissinger, who advises Trump on foreign policy issues. “I think Jared might be that person.”

Forbes credited Kushner with delivering “the presidency to the most fame-hungry, bombastic candidate” in US history.

And that achievement, plus Trump’s trust in him, “uniquely positions Kushner to be a power broker of the highest order for at least four years,“ according to Forbes.