Portsmouth Crown Court heard the pair were tasked with emptying them but instead pocketed the fees for themselves.
Philip Bartlett and team leader Patrick Cambra were caught on CCTV installed after a co-worker raised the alarm.
Takings were short on the days the men were on duty, so cameras were put into the machines - catching them in the act.
Bartlett pocketed between £4,000 and £5,000 while Cambra admitted taking £80-100 on up to 10 occasions, netting him £1,000.
Both men were employed by Engie Ltd, which has a 22-year contract worth £1.2bn for services at QA Hospital managing 950 staff.
Prosecutor Richard Hearnden said Cambra had worked at the hospital for more than a decade. Bartlett had been employed for nine years.
‘The money had come from parking meters from the pay machines that had been emptied, or rather at the time of being emptied,’ Mr Hearnden said.
‘The loss of money came to the notice of another member of staff who was responsible for counting.
‘It was noticed that the money was going missing. Cameras were placed in the machines.
‘On being challenged by the employers on the missing money, both defendants made admissions and resigned on the spot.’
Mr Hearnden said there was ‘some suggestion’ the thefts were opportunistic in that cash was ‘sticking out of the machines’ when they took it.
Sentencing, judge Tim Mousley QC said took advantage of the chance to steal, and added: These were unsophisticated thefts and it was inevitable that anomalies would show up in the record sooner or later.’
He said all it took was workers to then look at the cameras ‘to identify you as the thieves’.
Bartlett, 46, of Jubilee Gardens, Southampton, and Cambra, 52, of York Terrace, Hilsea, were each handed a 12-month community order with 200 hours’ unpaid work.
Lifeguard Bartlett must pay £4,000 compensation while Cambra - who also now has a new job - must pay £1,000.
Both admitted theft from an employer. They were charged with taking more than £20,000 based on an estimated ‘shortfall’ in takings on the days they worked, the court heard.
The Crown Prosecution Service accepted their pleas to lower figures.
Jonathan Underhill, for Cambra, said his client showed a ‘terrific lapse in judgement’.
Parking charges start at £2 for up to 90 minutes.