The compressibility and shear strength of soil play a crucial role in engineering design and construction. For this study, samples were collected from the indoor geotechnical tests conducted on the fourth layer of the third series of the Haikou Formation. By conducting a correlation analysis of various physical properties of soil and utilizing the random forest algorithm, we developed a predictive model for the compressibility and shear strength of coastal soft soil. Initially, we proposed an empirical formula that utilizes mathematical statistical analysis methods to characterize the correlation between the indicators of this soil. Subsequently, we employed the feature selection guided by the aforementioned data analysis results to establish a random forest model. This model predicts the compressive modulus, compressibility coefficient, cohesion, and internal friction angle of the soil. The results indicate that the established model exhibits strong predictive capabilities, with the mean squared error values of compression modulus (0.012), compression coefficient (1.21× 10−6), cohesion (0.081), and internal friction angle (0.003). The data analysis methods, fitting parameters, empirical formulas, and random forest model employed in this study hold substantial value in guiding the preliminary evaluation stage of engineering projects with limited data. This study helps to save time and cost of geotechnical investigation for soft soils in the area.