A measurement of the ratio of the branching fractions of the B(+) → K(+)μ(+)μ(-) and B(+) → K(+)e(+)e(-) decays is presented using proton-proton collision data, corresponding to an integrated luminosity of 3.0 fb(-1), recorded with the LHCb experiment at center-of-mass energies of 7 and 8 TeV. The value of the ratio of branching fractions for the dilepton invariant mass squared range 1 < q(2) < 6 GeV(2)/c(4) is measured to be 0.745(-0.074)(+0.090)(stat) ± 0.036(syst). This value is the most precise measurement of the ratio of branching fractions to date and is compatible with the standard model prediction within 2.6 standard deviations.