A Perth family on the road-trip holiday of a lifetime in Indonesia has made a lucky escape after their car was swallowed by a sinkhole and flipped on its side.

Michael Rule, his wife Margie and their young son Sebastian were travelling through an Indonesian construction site when the road beneath their Land Rover fell away.

As the car teetered on the edge of the hole, Mr and Mrs Rule tried desperately to escape with their 20-month-old son.

The couple had seconds to escape from the vehicle and unclip their son from his seat before the car rolled into the hole.

“I just kind of yelled at Margie and said, ‘Get out! And get Sebastian out of the car!’” Mr Rule told ABC.

“I just jumped out and quickly grabbed him out as well … it was pretty instinctual,” Mrs Rule said.

“I couldn’t get out the driver’s side, so I crawled out the passenger door and then got a few steps away from the car and it just fell over the side,” Mr Rule added.

In the desperation of getting out of the car before it toppled into the hole, Mr Rule said they were unable to get any of their items out of the vehicle — including a pair of shoes.

Having started their trip in December, the couple say they have had various mishaps on the road, a journey that has formed their blog “Rules of the Road”.

“We’ve been on some crazy roads, near cliff edges and big holes in bridges and things like that, so I think I’ve prepared in my head a thousand times over should something like that happen,” Ms Rule said.

“And then we come to a city and it happens right here.”

The couple say their 1996 Land Rover will need to undergo repairs before they can continue their trip down to Semarang in central Java, followed by Kalimantan and Borneo, Sumatra, mainland Malaysia and into Thailand.

“Doing a trip like this, a lot of unexpected things really do happen and you just have to go with the flow,” Mr Rule told 9 News.

“The car is our home. It’s everything we have. Today we will start to work out how we will get it fixed,” Mrs Rule added.

Mr and Mrs Rule say they were “shocked” when they watched footage that had been filmed through CCTV cameras of the incident.

“It looked really terrible. We didn’t even know there was footage until we got to the hotel and spoke to our families,” Mrs Rule said.

“In the midafternoon, they got a crane and lifted it out.

“It looks pretty well smashed as it landed on the concrete road barriers that fell as well.”