In offshore wind power engineering, the concrete cap foundation is a critical component of the support structure. Its optimal design is essential for improving structural performance and controlling costs. This study employs the topology optimization method in ABAQUS to perform lightweight optimization design of the offshore wind power concrete cap structure. A pile-free finite element model was established to compare conventional algorithms with stiffness-based algorithms, analyzing stress distribution and material utilization efficiency of the cap under different volume constraints. The results indicate that both algorithms yield similar optimization performance. Based on the pile-free model, a pile-supported finite element model was developed for further optimization. The findings suggest that the top of the cap can be cut at a 45° angle and reinforcement in the central region can be reduced, leading to more rational structural force distribution. Additionally, it is recommended that design codes incorporate the working condition of pile-top truncation to enhance engineering applicability.