A measurement of the W boson pair production cross section in proton-proton collisions at root s = 8TeV is presented. The data collected with the CMS detector at the LHC correspond to an integrated luminosity of 19.4 fb(-1). The W+W- candidates are selected from events with two charged leptons, electrons or muons, and large missing transverse energy. The measured W+W- cross section is 60.1 +/- 0.9 (stat) +/- 3.2 (exp) +/- 3.1 (theo) +/- 1.6 (lumi) pb = 60.1 +/- 4.8 pb, consistent with the standard model prediction. The W+W- cross sections are also measured in two different fiducial phase space regions. The normalized differential cross section is measured as a function of kinematic variables of the final-state charged leptons and compared with several perturbative QCD predictions. Limits on anomalous gauge couplings associated with dimension-six operators are also given in the framework of an effective field theory. The corresponding 95 % confidence level intervals are -5.7 < c(WWW)/Lambda(2) < 5.9TeV(-2), -11.4 < c(W)/Lambda(2) < 5.4TeV(-2), -29.2 < c(B)/Lambda(2) < 23.9 TeV-2, in the HISZ basis.