This study was undertaken to investigate the application of visible and near infrared (vis -NIR) spectroscopy for determining soil cation exchange capacity (CEC) under laboratory and on-line field conditions. Measurements were conducted in two fields with clay texture in field 1 (F1) and clay-loam texture in field 2 (F2) both in Turkey. Partial least squares (PLS) regression analyses with full cross-validation were carried out to establish CEC models using three datasets of F1, F2 and F1 + F2. Analytically-measured, laboratory vis-NIR and on-line vis-NIR predicted maps were produced and compared statistically by kappa coefficient. Results of the CEC prediction using laboratory vis-NIR data gave good prediction results, with averaged r(2) values of 0.92 and 0.72, root mean squared errors of prediction (RMSEP) of 1.89 and 1.54 cmol kg(-1) and residual prediction deviations (RPD) of 3.69 and 1.89 for F1 and F2, respectively. Less successful predictions were obtained for the on-line measurement with r(2) of 0.75 and 0.7, RMSEP of 4.79 and 1.76 cmol kg(-1) and RPD of 1.45 and 1.56 for F1 and F2, respectively. Comparisons using kappa statistics test indicated a significant agreement (kappa = 0.69) between analytically-measured and laboratory vis-NIR predicted CEC maps of F1, while poorer agreement was found for F2 (kappa = 0.43). A moderate spatial similarity was also found between analytically-measured and on-line vis-NIR predicted CEC maps in F1 (kappa = 0.50) and F2 (kappa = 0.49). This study suggests that soil CEC can be satisfactorily analysed using vis-NIR spectroscopy under laboratory conditions and with somewhat less precision under on-line scanning conditions. (C) 2016 IAgrE. Published by Elsevier Ltd. All rights reserved.