The microbiome modulates host immunity and aids the maintenance of tolerance in the gut, where microbial and food-derived antigens are abundant. Yet modern dietary factors and the excessive use of antibiotics have contributed to the rising incidence of food allergies, inflammatory bowel disease and other non-communicable chronic diseases associated with the depletion of beneficial taxa, including butyrate-producing Clostridia. Here we show that intragastrically delivered neutral and negatively charged polymeric micelles releasing butyrate in different regions of the intestinal tract restore barrier-protective responses in mouse models of colitis and of peanut allergy. Treatment with the butyrate-releasing micelles increased the abundance of butyrate-producing taxa in Clostridium cluster XIVa, protected mice from an anaphylactic reaction to a peanut challenge and reduced disease severity in a T-cell-transfer model of colitis. By restoring microbial and mucosal homoeostasis, butyrate-releasing micelles may function as an antigen-agnostic approach for the treatment of allergic and inflammatory diseases.