In this study, it was aimed to enrich D-pinitol in carob extract using nanofilters in the range of 1-5 kDa molecular weight cut-off (MWCO). Enrichment stages were extraction, clarification, adsorbent application and nanofiltration applications. The Box-Behnken Response Surface Methodology (RSM) was used to optimize nanofiltration application. D-pinitol content, sugar composition, total phenolic matters (TPC), total dry matters (TDM) and total minerals were determined for the purity control of the product obtained in the final stage. The highest D-pinitol concentration in extracts was achieved in nanofiltration at the 5 kDa MWCO under the condition of 3 bar feed pressure, 25°C feed temperature and 83.3% permeate rate, in which the extract contained 10.48 g/L of D-pinitol. In the study, an optimization model based on pressure, temperature and permeate/retentate ratio variables were created for the nanofiltration process. Thus, the change in the D-pinitol concentration of the extracts depending on different conditions was mathematically modelled with a high accuracy (R2=0.91). Depending on this model, the highest amount of sucrose, TPC and TDM in carob extracts was determined under the condition that the D-pinitol concentration was 8.7%.