The Airbus A330-200 aircraft was flying from Japan to Australia late on Wednesday night when, four hours into the flight, smoke was seen in the cockpit and the right-hand cockpit window area caught fire, Jetstar said.
"One of our pilots utilised an extinguisher and we conducted an emergency diversion to Guam where the aircraft landed without incident," Jetstar spokesman Simon Westaway told Australian radio.
The plane touched down in the early hours of Thursday, Australian time, Jetstar said. All passengers and crew were safe and no one had been injured, the airline said, adding that the flight was carrying mainly Japanese passengers.
The aircraft was only two years' old and would be held in Guam until the cause of the fire was established, Jetstar said. An Air France Airbus A330 jet crashed at sea on a flight from Rio de Janeiro to Paris last week, killing all 228 people on board.
Jetstar is a unit of Australian carrier Qantas.