A safety valve (1), in particular for tanks carried by vehicles, has a valve body (2) defining a cavity (3) that houses a buoyant valve member (4) that is able to assume a closing position and a plurality of opening positions with respect to a valve seat (14). The valve body (2) comprises an upper body part (5) and a lower body part (6), axially extending between which is an intermediate body part (7), one of the upper body part (5) and the intermediate body part (7) having an inlet (8), one of the upper body part (5) and the intermediate body part (7) having an outlet (9), and the lower body part (6) having a drain opening (12). The valve seat (14) is defined at one end of the outlet (9) is oriented towards the lower body part (6) in such a way that an accumulation of a liquid inside the valve body (2) causes raising of the buoyant valve member (4) towards the valve seat (14), the distance between the valve seat (14) and the lower body part (6) determining a capacity of accumulation of liquid inside the valve body (2) beyond which the buoyant valve member (4) assumes the aforesaid closing position. The intermediate body part (7) comprises at least one substantially annular component (15) configured for being sealingly coupleable to at least one further substantially annular component (15) to enable variation of an axial dimension of the intermediate part (7) of the valve body (2), and thereby variation of said capacity of accumulation of liquid.