The purely electroweak (EW) cross section for the production of two jets in association with a Z boson, in proton-proton collisions at [Formula: see text], is measured using data recorded by the CMS experiment at the CERN LHC, corresponding to an integrated luminosity of 19.7[Formula: see text]. The electroweak cross section for the [Formula: see text] final state (with [Formula: see text] or [Formula: see text] and j representing the quarks produced in the hard interaction) in the kinematic region defined by [Formula: see text][Formula: see text], [Formula: see text][Formula: see text], transverse momentum [Formula: see text][Formula: see text], and pseudorapidity [Formula: see text], is found to be [Formula: see text], in agreement with the standard model prediction. The associated jet activity of the selected events is studied, in particular in a signal-enriched region of phase space, and the measurements are found to be in agreement with QCD predictions.