In astrophysics and nuclear physics, nuclear pasta is a theoretical type of degenerate matter that is postulated to exist within the crusts of neutron stars. Between the surface of a neutron star and the quark–gluon plasma at the core, at matter densities of 1014 g/cm3, nuclear attraction and Coulomb repulsion forces are of similar magnitude. The competition between the forces leads to the formation of a variety of complex structures assembled from neutrons and protons. Astrophysicists call these types of structures nuclear pasta because the geometry of the structures resembles various types of pasta.
Neutron stars form as remnants of massive stars after a supernova event. Unlike their progenitor star, neutron stars do not consist of a gaseous plasma. Rather, the intense gravitational attraction of the compact mass overcomes the electron degeneracy pressure and causes electron capture to occur within the star. The result is a compact ball of nearly pure neutron matter with sparse protons and electrons in between in a space several thousand times smaller than the progenitor star.
At the surface, the pressure is low enough that conventional nuclei, such as helium and iron, can exist independently of one another and are not crushed together due to the mutual Coulomb repulsion of their nuclei. At the core, the pressure is so great that this Coulomb repulsion cannot support individual nuclei, and some form of ultradense matter, such as the theorized quark–gluon plasma, should exist.
The presence of a small population of protons is essential to the formation of nuclear pasta. The nuclear attraction between protons and neutrons is greater than the nuclear attraction of two protons or two neutrons. Similar to how neutrons act to stabilize heavy nuclei of conventional atoms against the electric repulsion of the protons, the protons act to stabilize the pasta phases. The competition between the electric repulsion of the protons, the attractive force between nuclei, and the pressure at different depths in the star lead to the formation of nuclear pasta.
While nuclear pasta has not been observed in a neutron star, its phases are theorized to exist in the inner crust of neutron stars, forming a transition region between the conventional matter at the surface and the ultradense matter at the core. Towards the top of this transition region, the pressure is great enough that conventional nuclei will be condensed into much more massive semi-spherical collections. These formations would be unstable outside the star, due to their high neutron content and size, which can vary between tens and hundreds of nucleons. This semispherical phase is known as the gnocchi phase.
When the gnocchi phase is compressed, as would be expected in deeper layers of the crust, the electric repulsion of the protons in the gnocchi is not fully sufficient to support the existence of the individual spheres, and they are crushed into long rods, which, depending on their length, can contain many thousands of nucleons. Immersed in a neutron liquid, these rods are known as the spaghetti phase. Further compression causes the spaghetti phase rods to fuse and form sheets of nuclear matter called the lasagna phase. Further compression of the lasagna phase yields the uniform nuclear matter of the outer core with intermittent holes of neutron (and possibly proton) liquid. Progressing deeper into the inner crust, those holes in the nuclear pasta change from being cylindrical, called by some the bucatini phase or antispaghetti phase, into scattered spherical holes, which can be called the Swiss cheese phase. The nuclei disappear at the crust–core interface, transitioning into the liquid core of the star. For a typical neutron star of 1.4 solar masses (M☉) and 12 km radius, the nuclear pasta layer in the crust can be about 100 m thick and have a mass of about 0.01 M☉. In terms of mass, this is a significant portion of the crust of a neutron star. 
- Pons, José A.; Viganò, Daniele; Rea, Nanda (2013). "Too much "pasta" for pulsars to spin down". Nature Physics. 9 (7): 431–434. arXiv:1304.6546. Bibcode:2013NatPh...9..431P. doi:10.1038/nphys2640.
- Reagan, David. "Visualizations of Nuclear Pasta". Advanced Visualization Lab, Research Technologies, Indiana University. Retrieved 28 June 2013.
- Nuclear Physics Panel; Physics Survey Committee; Board on Physics and Astronomy; Commission on Physical Sciences, Mathematics, and Applications, Division on Engineering and Physical Sciences (1 January 1986). Nuclear Physics. National Academies Press. pp. 111–. ISBN 978-0-309-03547-7.
- Beskin, Vasilii S. (1999). "Radio pulsars". Physics-Uspekhi. 42 (11): 1173–1174. Bibcode:1999PhyU...42.1071B. doi:10.1070/pu1999v042n11ABEH000665.
- Peter Höflich; Pawan Kumar; J. Craig Wheeler (16 December 2004). Cosmic Explosions in Three Dimensions: Asymmetries in Supernovae and Gamma-Ray Bursts. Cambridge University Press. pp. 288–. ISBN 978-1-139-45661-6.
- Yakovlev, D. G. (2015). "Electron transport through nuclear pasta in magnetized neutron stars". Monthly Notices of the Royal Astronomical Society. 453 (1): 581–590. arXiv:1508.02603. Bibcode:2015MNRAS.453..581Y. doi:10.1093/mnras/stv1642.