A sample of 2.8×104 K+→π+μ+μ− candidates with negligible background was collected by the NA62 experiment at the CERN SPS in 2017--2018. The model-independent branching fraction is measured to be (9.15±0.08)×10−8, a factor three more precise than previous measurements. The decay form factor is presented as a function of the squared dimuon mass. A measurement of the form factor parameters and their uncertainties is performed using a description based on Chiral Perturbation Theory at O(p6).