Localized method of fundamental solutions is applied to the simulation and analysis of electrostatic field problems. The localized method of fundamental solutions is a meshless algorithm based on local theory and moving least square approximation, which uses fundamental solution of the governing equation. Compared with traditional mesh-type methods such as finite element method and finite difference method, this method needs discrete nodes only, and avoids troublesome mesh generation. As a semi-analytical numerical technique, fundamental solutions of physical problems are used as interpolation basis functions to establish a numerical discrete model, thus ensuring high accuracy of the algorithm. In addition, compared with meshless methods with global discretization scheme, the local fundamental method is more suitable for high-dimensional complex geometry and large-scale simulation. Two- and three-dimensional numerical tests show that this method is convenient, flexible, accurate and fast. It is a new way for electrostatic field simulation. It expands application of localized method of fundamental solutions.