We present a constraint which incorporates in the geophysical inverse problem a priori information about the source convexity. Two kinds of convexity are considered: directional convexity, defined as the attribute of a body being intersected at most at two points by a straight line with a fixed spatial orientation, and global convexity, defined as the attribute of a body being intersected at most at two points by any arbitrarily oriented straight line. The interpretation model consists of several juxtaposed 2-D prisms whose positions, widths, and physical property are established by the interpreter. The depth to the top and the thickness of each prism are the parameters to be determined. The directional convexity is incorporated by minimizing a functional which expresses the number of times that several lines, parallel to a given direction and spaced at regular intervals, intersect the interpretation model. On the other hand, the global convexity is introduced in an algorithmic way by constraining the depths to the top and to the bottom of each prism to be, respectively, smaller or greater than the average of the depths to the top or to the bottom of the adjacent prisms. The use of the presented convexity contraint is demonstrated using synthetic gravity data produced by an isolated source. We found that convexity constraints (either directional along the horizontal axis or global) alone are insufficient to produce strongly stable solutions, although they reduce substantially the solution instability. Despite the “slight” instability, the directional convexity constraint leads to a reasonable delineation of the source shape and produces a better resolution of its base as compared with the inverse method imposing smoothness constraints on the top and bottom surfaces of the anomalous source. The potential use of the convexity constraint is the possibility of combining it with other constraints to produce geologically meaningful solutions. As an example, the global convexity was combined with the minimum moment of inertia of the anomalous masses about a vertical axis passing through its center of mass. This combination allowed introducing a priori information about a diapir shape. This is important because a maximum spread at the diapir middle portion indicates that it ascended like a viscous bubble in an isotropic medium. On the other hand, a spread located at its top indicates that the host medium is mechanically anisotropic, exhibiting horizontal planes of weakness where the mobile material was forced into. So, this combination of constraints alows introducing a priori information about the diapir emplacement. The combination of global convexity and minimum moment of inertia may also be applied to isolated intrusions, as illustrated with the real gravity anomaly produced by the granitic body of Castelsarrasin, in the Aquitaine Basin, France. The estimated source has its top located between 0.45 and 0.57 km from the surface, a base 6.4 km deep, and center of mass at a depth of 3.5 km, which agree reasonably with a priori geological and geophysical information about the body.