Stress is a common psychological issue among Generation Z, driven by academic pressure, social comparison, and digital exposure. Early detection is essential to prevent more severe mental health problems such as anxiety disorders, burnout, or depression. This study aims to optimize a web-based stress detection system using the Recursive Feature Elimination (RFE) method combined with the Random Forest algorithm. A dataset consisting of 500 psychological assessment records and 12 symptom features (G01 to G12) from A3M Consultant Surabaya was used as the basis for analysis. RFE successfully reduced the number of features to six key indicators, such as G01 (anxiety), G02 (emotional instability), G04 (restlessness), G08 (withdrawal), G09 (confusion), and G12 (suicidal thoughts) while maintaining high model accuracy. The baseline Random Forest using 12 features achieved 0.91 accuracy, while the RFE-optimized model with 6 selected features maintained a comparable accuracy of 0.90. The resulting model achieved an accuracy of approximately 0.90 based on Stratified K-Fold Cross Validation, showing consistent performance across folds. The optimized model was then integrated into a web application called “The Z Space,” which combines data driven predictions from Random Forest with rule- based reasoning using Forward Chaining. This hybrid approach ensures both interpretability and accuracy in determining stress levels. The findings highlight that RFE effectively reduces computational complexity without decreasing model performance, making it suitable for real time web implementation in stress detection systems for Generation Z.