A soft, edible electrode made from alginate and polydopamine detects glucose under intestinal conditions, opening a path toward swallowable sensors for diabetes monitoring.