A Singaporean navy ship on Wednesday located the main body of the AirAsia plane that crashed into the Java Sea late last month, raising hopes that bodies of most of the 162 victims will now be found.

Underwater photos showed the cracked fuselage and part of a wing of Flight QZ8501, that went down on December 28 in stormy weather during a short trip from the Indonesian city of Surabaya to Singapore.

The discovery of the fuselage is the latest boost in a lengthy search operation in Indonesian waters hampered by bad weather. Just 50 bodies have so far been recovered with most of the victims believed to be trapped inside the Airbus 320-200's main body.

It followed the retrieval this week of both the plane's black boxes, which contain vital information to help investigators determine what caused the crash.

AirAsia boss Tony Fernandes confirmed the fuselage had been found in a tweet, saying: "It is so so sad though seeing our aircraft. I'm gutted and devastated."

"We hope all our guests are there," he added.

Singapore's Defence Minister Ng Eng Hen said in a Facebook post that the MV Swift Rescue had located the wreckage, which was 26 metres (85 feet) long and about two kilometres from where the plane's tail was found earlier.

On the photos accompanying the post, taken by the ship's remotely operated vehicle, the words "now" and "everyone" are visible, apparently from AirAsia's motto "Now Everyone Can Fly" painted on the plane's exterior.

Indonesia's national search and rescue chief Bambang Soelistyo said that divers would head to the main body on Thursday.

"It is already dark so we will carry out the dive tomorrow morning with the target to find the victims which may still be around it or trapped in the body," he said.

"If the divers have any difficulty, the next step will then be to lift the body and the wing."

- Vital black boxes -

He added that two more victims were found Wednesday, meaning 50 bodies have so far been retrieved.

The Singapore navy ship was part of a huge international hunt for the plane, which also included US and Chinese ships.

Story continues

The so-called black boxes -- which are actually orange in colour -- have been flown to Jakarta, where Indonesia's National Transport Safety Committee is leading a probe into the accident, helped by experts from countries including France and the United States.

The country's meteorological agency has said bad weather may have caused the crash but only the black boxes will be able to provide definitive answers.

Investigators have started retrieving data from the recorders and converting it into a usable format, which will take around a week, before the lengthy analysis process can begin, committee head Tatang Kurniadi told AFP.

The flight data recorder holds a wealth of information about every major part of the plane, with details such as the jet's speed and the direction it was heading in, while the cockpit voice recorder stores radio transmissions and sounds in the cockpit.

The committee has said a preliminary report on the accident will be produced within a month, and a final report after a year.

At a port near Pangkalan Bun, the search headquarters on Borneo island, Indonesian investigators and their French counterparts also began examining the tail, which was lifted out of the water at the weekend.

Before take-off, the plane's pilot had asked for permission to fly at a higher altitude to avoid a major storm but the request was not approved due to other planes above him on the popular route.

In his last communication, the experienced pilot said he wanted to change course to avoid the storm. Then all contact was lost, about 40 minutes after take-off.

All but seven of those on board the flight were Indonesian. The foreign nationals were from South Korea, Singapore, Malaysia, Britain and France.