Bacteria can generate heterogeneity through phase variation, including enzyme-mediated inversion of specific intergenic regions of genomic DNA. We developed a computation tool that identifies invertible elements using long-read datasets, PhaVa. We identified over 300 ‘intragenic invertons,’ a new class of invertible elements entirely within genes, in both bacteria and archaea. In the gut commensal Bacteroides thetaiotaomicron, we experimentally characterized an intragenic inverton in the thiamine biosynthesis protein thiC. We used mass spectrometry in data-independent acquisition mode to identify and quantify B. theta proteins, including thiC inverton expression at the protein level.