Toothpaste contains menthol that reduces swelling and provides a cooling effect, making it effective for ant bites.