A young boy was almost killed on Monday after he hid in a bin that was picked up by a rubbish truck.

The nine-year-old boy – from Yarrawonga – wanted to see what the inside of a rubbish truck looked like and deliberately hid in the bin.

If the driver hadn't spotted the boy in the truck's camera, the hydraulic paddle that crushes the rubbish would have killed the boy, works manager David Geddes of DS Kendell Waste Services told 3AW radio.

"The driver was very alert," said Mr Geddes. "He saw the lad's hands clinging to the inside of the truck and he was able to shut down immediately.