This paper presents a family of two-parametric interior solutions of Einstein–Maxwell field equations in general relativity for a static spherically symmetric distribution of a charged perfect fluid with particular form of charge distribution. This class of solutions gives us wide range of parameters, n and K, for which the solutions are well behaved hence, suitable for modeling of compact star (e. g. bare strange quark star). The mass of star is maximized with all degree of suitability by assuming the stellar “surface” density equal to strange (quark) matter density at zero pressure. It is hoped that our investigation may be of some help in connection of some study of stellar structure.