Morphological operators are crucial in image analysis. Their integration into deep learning pipelines could improve performances by extracting or enhancing important image features, either within network architectures or loss functions. However, the difficulties in rendering those operators differentiable hinder their integration. In this paper, we present SoftMorph, a novel framework designed to convert any binary morphological operator defined as a Boolean expression into its differentiable and probabilistic counterpart, compatible with gradient-based optimization. Specifically, we define probabilistic operators as the expectation of the binary operator with respect to the probability of generating each binary configuration. This expectation can be computed trivially from the truth table of the binary morphological filter, as a multi-linear polynomial function. Moreover, we approximate the probabilistic operators with quasi-probabilistic operators directly translated from the Boolean expressions leveraging Fuzzy logic. These quasi-probabilistic operators therefore maintain the computational complexity of the original binary operator. We demonstrate the efficiency and reliability of our method through validation experiments, and evaluate the backpropagation capability of the proposed operators. Finally, we showcase several applications of morphological operators integrated into neural networks for image segmentation tasks.