A direct search for lepton flavour violating decays of the Higgs boson (H) in the H→eτH→eτ and H→eμH→eμ channels is described. The data sample used in the search was collected in proton–proton collisions at View the MathML sources=8 TeV with the CMS detector at the LHC and corresponds to an integrated luminosity of 19.7 fb−1. No evidence is found for lepton flavour violating decays in either final state. Upper limits on the branching fractions, B(H→eτ)<0.69%B(H→eτ)<0.69% and B(H→eμ)<0.035%B(H→eμ)<0.035%, are set at the 95% confidence level. The constraint set on B(H→eτ)B(H→eτ) is an order of magnitude more stringent than the existing indirect limits. The limits are used to constrain the corresponding flavour violating Yukawa couplings, absent in the standard model.