A New York City tech startup has found an interesting way to spend $7.5 million after a $10 million round of fundraising: it bought a Brooklyn headquarters building.

Kickstarter is buying the landmarked Greenpoint building, a ruin of an old Brooklyn pencil factory, because it wants to put down roots in the borough. The pricetag for the historic HQ, includes the cost of buying the building and multimillion dollar repairs.

“We are hoping to stay at 58 Kent [St.] forever — to be our permanent headquarters,” Kickstarter CEO Perry Chen told a local Community Board in June.

Not many Big Apple tech startups own their own headquarters — even companies as successful as Kickstarter.

The 3-year-old company has catapulted to success as a pioneer in crowdfunding — tapping the masses to raise money.

In May, Kickstarter hosted its most successful product launch when a company called Pebble raised more than $10 million to make a smartwatch.

There have been more than 27,000 successful projects, raising more than $255 million. Kickstarter takes 5 percent of the money raised — meaning it has topped $12.5 million in revenue.

And now it owns a chunk of Brooklyn real estate.

The company wasn’t discussing the historic renovation plans at its building, approved by the city earlier this summer.

Kickstarter raised the $10 million from venture capitalists, including top city investors like Union Square Ventures and Thrive Capital, according to sources familiar with the fundraising round.

Other city tech startups have shied away from buying brick-and-mortar HQs.

For example, Etsy, which was early to the Brooklyn tech scene in 2005, rents its space at a landmark DUMBO building despite having raised more than $90 million.

The Kickstarter building was once the Eberhard Faber Pencil Co. factory, but all that remained was a two-story wall of mixed red bricks and boarded arched windows.

Community officials had nothing but praise for Kickstarter’s plans, which will save the wall and its colorful variety of brick. The company also is bringing back the windows and entryways.

The main attraction for Kickstarter employees, the number of which is expected to be 50 by the time the company moves into the building, is a rooftop garden penthouse — the ultimate amenity for city startups.