Results of the neutron powder diffraction measurements carried out for R 5Pt2In4 (R = Tb–Tm) are reported. The compounds crystallize in an orthorhombic crystal structure of the Lu5Ni2In4-type with the rare earth atoms occupying three different sublattices. Neutron diffraction data reveal that at low temperatures the rare earth magnetic moments order below the critical temperature equal to 105, 93, 28, 12 and 3.8 K for R = Tb, Dy, Ho, Er and Tm, respectively. With decreasing temperature the rare earth magnetic moments at the 2a and 4g2 sites order first, while the moments at the 4g1 site order at lower temperatures. Ferrimagnetic order along the c axis, described by the propagation vector k 1 = [0, 0, 0], develops in Tb5Pt2In4 below the Curie temperature (T C = 105 K). At lower temperatures, an antiferromagnetic component in the ab plane appears. The component is incommensurate with the crystal structure (k 2 = [0, 0.66, ½]), but it turns into a commensurate one (k 3 = [0, 0, ½]) with decreasing temperature. Antiferromagnetic order along the c axis, described by k 4 = [½, 0, 0], is found in Dy5Pt2In4 below the Néel temperature (T N = 93 K). The k 4-related component disappears below 80 K and the magnetic structure transforms into a ferro/ferrimagnetic one described by k 1 = [0, 0, 0]. Further decrease in temperature leads to the appearance of an incommensurate antiferromagnetic component within the ab plane below 10 K (k 2 = [0, 0.45, ½]), which finally turns into a commensurate one (k 5 = [0, ½, ½]). In Ho5Pt2In4, a sine-modulated magnetic structure with moments parallel to the c axis (k 6 = [⅓,0,0]) is observed below 28 K. With a decrease in temperature, new components, related to k 1 = [0, 0, 0] (bc plane) and k 4 = [½, 0, 0] (c axis), appear. The coexistence of two orderings – in the ab plane (k 1 = [0, 0, 0]) and a modulated one with moments along the b axis (k 7 = [k x , 0, 0]) – is found in Er5Pt2In4 below 12 K. Decreasing temperature leads to the order–order transformation of the k 1-related component to another one with magnetic moments still constrained to the ab plane and preserved value of the propagation vector (i.e. k 1 = [0, 0, 0]). Tm5Pt2In4 orders antiferromagnetically below T N = 3.8 K. Thulium magnetic moments lie in the ab plane, while the magnetic structure is described by k 5 = [0, ½ , ½]. The direction of magnetic moments depends on the rare earth element involved and indicates an influence of single ion anisotropy resulting from interaction with the crystalline electric field.