The incommensurately modulated structure of K3In(PO4)(2) has been solved and refined. The origin of the modulation relates to the ordering of K cations within the hexagonal close packing of the PO4 anions. The driving forces for the modulation of the other cations are In-P and K-P interactions. The modulation of O atoms of rigid PO4 units follows the cations in order to stabilize the InO6 octahedron. It is shown that the previously published three-dimensional structure rerned from powder diffraction data obtained at room temperature is an average structure. Therefore the incommensurately modulated phase of K3In(PO4)(2) is the only one that has been unequivocally identired at room temperature. The origin of the modulation is discussed in comparison with the structures of Na3InP2, alpha- and beta-Na3In(PO4)(2), Na3Fe(PO4)(2) and Rb3In(PO4)(2).