A cap for medical fluid lines and the like characterized in that it comprises a hollow body (1) within which a male or female connector (2 3) accessible at one end of the body (1) is coaxially housed and is configured so as to inviolably obstruct the passage through said body (1). A unidirectional coupling (12 13) is provided to lock in rotation the connector (2 3) with respect to the body (1) in the direction (F) corresponding to the screwing of the connector (2 3) and a complementary connector to be coupled therewith and to enable free rotation of the connector (2 3) in the opposite direction. The connector (2 3) can be possibly locked in rotation with respect to the body (1) in the unscrewing direction only following a positive command.