Structured light fields embody strong spatial variations of polarization, phase, and amplitude. Understanding, characterization, and exploitation of such fields can be achieved through their topological properties. Three-dimensional (3D) topological solitons, such as hopfions, are 3D localized continuous field configurations with nontrivial particle-like structures that exhibit a host of important topologically protected properties. Here, we propose and demonstrate photonic counterparts of hopfions with exact characteristics of Hopf fibration, Hopf index, and Hopf mapping from real-space vector beams to homotopic hyperspheres representing polarization states. We experimentally generate photonic hopfions with on-demand high-order Hopf indices and independently controlled topological textures, including Néel-, Bloch-, and antiskyrmionic types. We also demonstrate a robust free-space transport of photonic hopfions, thus showing the potential of hopfions for developing optical topological informatics and communications.