A measurement is presented of the cross section for the electroweak production of a W boson in association with two jets in proton-proton collisions at a center-of-mass energy of 8 TeV. The data set was collected with the CMS detector and corresponds to an integrated luminosity of 19.3 fb−1. The measured fiducial cross section for W bosons decaying to electrons or muons and for pT j1> 60 GeV, pT j2> 50 GeV, |ηj| < 4.7, and mjj> 1000 GeV is 0.42 ± 0.04 (stat) ± 0.09 (syst) ± 0.01 (lumi) pb. This result is consistent with the standard model leading-order prediction of 0.50 ± 0.02 (scale) ± 0.02 (PDF) pb obtained with MadGraph5_amc@nlo 2.1 interfaced to pythia 6.4. This is the first cross section measurement for this process.