Behind a windowless door near the western edge of Williamsburg hides a magical destination — for pasta.

Inspired by the world of magic, Pasta Wiz opened with Insta-fame earlier this month, thanks to initial viral reports that dubbed the place a “Harry Potter restaurant” and sent “Potterheads” by the hundreds to the rustic restaurant.

Even before owner Alex Dimitrov had finalized the menu, he said there were 500 people lining up outside the doorway.

Despite the boom to business the Potter fans have brought, Dimitrov is keen to move away from the “Harry Potter” universe — particularly after receiving a complaint call from Warner Bros. Pictures, which owns the “Harry Potter” film franchise.

“We have a magical place, but we’re not Harry Potter,” Dimitrov, 49, told amNewYork.

The restaurant is adorned with mystical decorations that look as though they came right out of a child’s storybook, from a broomstick hanging on the wall to three-pronged candlesticks to a knight’s full suit of armor. A pointy old hat (that looks uncannily like the Sorting Hat from the “Harry Potter” films) sits on a counter.

Dimitrov collected the decorations over the years from auctions and antique sales.

“The kids love it,” said Dimitrov, who lives in Rego Park, Queens. “They love our chandelier, they love the big spiders, they love the magical crystal ball. We have a lot of little magical articles all over the place.”

In addition to the namesake pasta, which includes build-your-own bowls, the restaurant serves salads, juices, smoothies, crepes and desserts. Pasta dishes are priced $8.95-$13.95; salads are under $10.

“We’ve only been open for three weeks, but we already have a lot of regulars coming in,” Dimitrov said.

He’s also received several requests for group events like kids’ birthday parties.

Nowadays, the restaurant, which specializes in organic and gluten-free pasta served at lightning speed, sees between 300 to 400 customers per day, according to manager Majde “Mike” Awad, 45, who lives in central New Jersey. On weekends, that number doubles. Some end up waiting for 40 minutes before they get to order their meal.

Izzy Gobert, 19, said she decided to visit Pasta Wiz after her boss mentioned the restaurant’s supposed “Harry Potter” theme.

“I’ll go to anything that’s ‘Harry Potter,’” said Gobert, an Upper East Side resident who grew up watching the movies.

Customers who don’t care much for “Harry Potter” still seem to enjoy the restaurant’s quirks, like the fact that the entrance is somewhat hidden (look for a small green sign with the glowing words “Pasta Wiz” above the door).

Jen Randall, 20, a recent customer, said the secluded location makes Pasta Wiz feel “a little bit more exclusive,” as if only those who know where to look will find it.

For Dimitrov, the restaurant has been a long time coming. It took him six years to secure the location, after he received pushback from locals who were afraid he would follow through with his original plan of opening a nightclub. But the lifelong chef said he thought a restaurant was better suited to Williamsburg’s community.

“[The area] is made up of a lot of young people — a lot of young professionals, young families,” he said. “People walk past with their kids. This is a great place to open a pasta place.”

Over the next several months, Dimitrov plans to open two additional Pasta Wiz locations in Manhattan — one in the Financial District and one by Columbia University.

“We want to keep the magic going,” Dimitrov said.