The Ratu Adil, literally means Just King, is a messianic figure in Javanese folklore. The Ratu Adil will establish universal peace and justice in the manner of similar figures, such as King Arthur in European folklore. The Ratu Adil is first mentioned in the Pralembang Joyoboyo, the pseudonymous prophecies ascribed to King Joyoboyo of Kediri.

The prophecy predicts that the Ratu Adil will be poor and at first unknown. This was highly advantageous to most early nationalist leaders. The prophecy also talks about the decline of the nobility as real rulers. The mantle of Ratu Adil has been claimed by a number of leaders in recent Indonesian history, including Diponegoro, Hamengkubuwono IX, Sukarno and Megawati.