Former Mayor Rudy Giuliani paid a hefty price to get married at Gracie mansion: $50,000.

“The mayor contributed $50,000 to the Gracie Mansion Conservancy, and he did so with pleasure,” his spokeswoman, Sunny Mindel, revealed yesterday.

That was over and above the actual cost of feeding and entertaining 400 black-tie guests, for which Giuliani paid out of his own pocket.

Mayor Bloomberg allowed Giuliani to use the mansion to marry Judith Nathan last weekend in a glitzy, star-studded ceremony overlooking the East River.

The Post reported that the day before the ceremony, dozens of city Parks and Transportation workers spruced up the area around the mansion, and dozens of cops provided security.

When asked about the work, a Parks Department spokeswoman said it was “simply routine seasonal maintenance.”

Bloomberg insisted the wedding didn’t cost the city a cent. “The Giuliani ceremony cost the city nothing,” the mayor said the day after the wedding.

“I think the Parks Department put in some bushes and stuff they were going to do anyways. They tried to do it a week earlier, I think, but that was up to [Parks Commissioner] Adrian Benepe. I certainly didn’t tell him to do it.”

All other expenses were picked up by Giuliani, the mayor said. Giuliani, who lived at Gracie Mansion for eight years, also asked his guests to make a donation to the conservancy.