  Non-Abelian braiding has attracted significant attention because of its
pivotal role in describing the exchange behaviors of anyons--a candidate for
realizing quantum logics. The input and outcome of non-Abelian braiding are
connected by a unitary matrix which can also physically emerge as a
geometric-phase matrix in classical systems. Hence it is predicted that
non-Abelian braiding should have analogues in photonics, but a feasible
platform and the experimental realization remain out of reach. Here, we propose
and experimentally realize an on-chip photonic system that achieves the
non-Abelian braiding of up to five photonic modes. The braiding is realized by
controlling the multi-mode geometric-phase matrix in judiciously designed
photonic waveguide arrays. The quintessential effect of
braiding--sequence-dependent swapping of photon dwell sites is observed in both
classical-light and single-photon experiments. Our photonic chips are a
versatile and expandable platform for studying non-Abelian physics, and we
expect the results to motivate next-gen non-Abelian photonic devices.
