Optical fibers are widely used in biomedical applications for sensing, imaging, and therapies. Unlike existing solid-state optical fibers, soft polymer and hydrogel fibers offer physical and chemical properties well suited for functionalization with biomolecules and long-term implantation in the body. Here, hydrogel optical fibers are fabricated with glucose-sensitive moieties and the swelling-induced sensing is demonstrated. The core of the fiber is made of poly(acrylamide-co-poly(ethylene glycol) diacrylate) (p(AM-co-PEGDA)) hydrogel functionalized with phenylboronic acid. The complexation of the phenylboronic acid and cis diols of glucose molecules lowers the apparent pKa of the hydrogel network and increases the concentration of the boronate anions that enhances the Donnan osmotic pressure to swell and change the physical size of the hydrogel optical fiber. This mechanism is reversible through ester group dynamic covalent binding of the phenylboronic acid with glucose molecules. Dynamic changes in the effective RI of the hydrogel optical fiber are measured through light propagation loss. The sensor sensitivity to glucose concentration is 1.2 mmol L−1 over a physiological range of 1–12 mmol L−1. The biocompatible hydrogel optical fibers may be subcutaneously implanted for continuous monitoring of interstitial glucose concentrations.