The thermal distillation of crude oil mixtures is an energy intensive process conducted on massive scale worldwide. Membrane-based separations are, in principle, much more efficient in energetic terms, if useful fractions can be obtained. We describe here a family of spirocyclic polytriazoles for membrane applications prepared by a convenient step-growth method using copper-catalyzed azide-alkyne cycloaddition, providing very fast reaction rates, high molecular weights and solubilities in common organic solvents, and non-interconnected microporosity. Fractionation of whole Arabian light crude oil and atmospheric tower bottoms feeds using these materials significantly enriched the low-boiling components and removed trace heteroatom and metal impurities, demonstrating opportunities to reduce the energy cost of crude oil distillation with tandem membrane processes. Membrane-based molecular separation under these demanding conditions is made possible by high thermal stability and a moderate level of dynamic chain mobility leading to transient interconnections between micropores, as revealed by calculations of static and swollen pore structures.