The 1883 eruption of Krakatau volcano in Indonesia was one of the most explosive volcanic events in history. It was a marine caldera-forming eruption that resulted in voluminous ignimbrite deposits and huge tsunamis. We have used numerical simulations to investigate three major mechanisms for tsunami generation: caldera collapse, phreatomagmatic explosion, and pyroclastic flow, and have constrained the source parameters. Computed tsunami characteristics for each hypothesis are compared with observations at locations along the coasts of the Sunda Strait, where tsunami data were obtained immediately after the eruption. For the pyroclastic flow hypothesis, two types of two-layer shallow water models, dense- and light-type models, were used under different initial conditions. Pyroclastic flows are erupted from a circular source following a sine function that assumes waning and waxing phases. Caldera collapse was performed using a simple piston-like plunger model, in which collapse duration was assumed to be up to 1 h. The phreatomagmatic explosion hypothesis was examined using simple empirical models for underwater explosions in shallow water, with explosion energy between 1016 and 1017 J. The results show that when a pyroclastic flow with a volume of >5 km3 and an average discharge rate of the order of 107 m3/s enters the sea, the computed tsunami heights are broadly consistent with historical records in coastal areas, including a tide gauge record at Batavia (now Jakarta). We conclude that a pyroclastic flow entering the sea is the most plausible mechanism of the 1883 Krakatau tsunami.