We develop a finite-element based level set method for numerically for shape and topology optimizatio. By combining the shape sensitivity analysis and level set method, a gradient descent algorithm is proposed to solve the model problems. Different from solving the nonlinear Hamilton–Jacobi equation with finite differences in traditional level set methods, we solve the level-set convection equation and reinitialization equation using the Galerkin finite element method. The methodology can handle shape and topological changes in both regular and irregular design regions. Numerical results are presented.