Microalgae harvesting via pH induced flocculation along with utilization of recovered medium after flocculation is one of the most economical methods for separating the microalgal biomass in order to reduce the dewatering cost. In this study, optimization of marine and freshwater microalgae flocculation by pH adjustment was investigated via central composite design methodology. One molar of KOH and NaOH solutions were used to increase the pH level of the microalgal culture. Increasing pH value of the medium provided the highest flocculation efficiency up to 92.63 and 86.18% with pH adjusted to 10.5 with KOH and NaOH solutions for marine microalgae Nannochloropsis oculata and freshwater microalgae Chlorella minutissima, respectively. Also, it was revealed that microalgae cells were still alive after flocculation process and their biochemical composition was not changed, and flocculated medium can be used again for the next microalgal production. According to the results, it can be said that this method is cheap and effective, simple to operate and provides the utilization of flocculated medium again.