The youths were detained by police after they were caught by officers on Saturday afternoon.
Scotland Yard said the teenage boys climbed over a low barrier into the car park at the southern end of the Palace.
They crossed back over into the public area when a police officer approached them and the trespass lasted just 30 seconds, a spokesman for the Met said.
He added: “The boys attempted to run away but were pursued and detained by police. They were arrested on suspicion of trespassing on a protected site, contrary to section 128 of the Serious Organised Crime Act 2005, shortly before 2.30pm.
"They did not gain access to any building.”
The youths were taken into custody at a central London police station.
Police said they were bailed the following day, pending further enquiries, to return to a central London police station on a date in early May.
The incident is not being treated as terrorist-related.