We conduct a study on measuring W+W- production and on the sensitivity limits at 95% confidence level on thirteen anomalous couplings obtained by dimension-8 operators related to the anomalous quartic W+ W-gamma gamma couplings. We consider the main e(-) p -> e(-) gamma* gamma p -> e(-) W+ W- p reaction with the sub-process gamma(*) gamma*-> W+ W- at the Large Hadron electron Collider (LHeC) and the Future Circular Collider-hadron electron (FCC-he). For the LHeC, energies of the e(-) beams are taken to be E-e = 60 and 140 GeV and the energy of the p beams is taken to be E-p = 7 TeV. For the FCC-he, energies of the e(-) beams are taken to be E-e = 60 and 140 GeV and the energy of the p beams is taken to be E-p = 50 TeV, respectively. It is interesting to note that the LHeC and the FCC-he will lead to model-independent limits on the anomalous quartic W+ W- gamma gamma couplings which are one order of magnitude more stringent than the CMS Collaboration limits and are competitive with other limits reported in the literature.