We compute the form factors for the $B to Kl^+l^-$ semileptonic decay process in lattice QCD using gauge-field ensembles with 2+1 flavors of sea quark, generated by the MILC Collaboration. The ensembles span lattice spacings from 0.12 to 0.045 fm and have multiple sea-quark masses to help control the chiral extrapolation. The asqtad improved staggered action is used for the light valence and sea quarks, and the clover action with the Fermilab interpretation is used for the heavy $b$ quark. We present results for the form factors $f_+(q^2)$, $f_0(q^2)$, and $f_T(q^2)$, where $q^2$ is the momentum transfer, together with a comprehensive examination of systematic errors. Lattice QCD determines the form factors for a limited range of $q^2$, and we use the model-independent $z$ expansion to cover the whole kinematically allowed range. We present our final form-factor results as coefficients of the $z$ expansion and the correlations between them, where the errors on the coefficients include statistical and all systematic uncertainties. We use this complete description of the form factors to test QCD predictions of the form factors at high and low $q^2$. We also compare a Standard-Model calculation of the branching ratio for $B to Kl^+l^-$ with experimental data.