The quantum Hall effect (QHE) originates from discrete Landau levels forming in a two-dimensional electron system in a magnetic field1. In three dimensions, the QHE is forbidden because the third dimension spreads Landau levels into overlapping bands, destroying the quantization. Here we report the QHE in graphite crystals that are up to hundreds of atomic layers thick, a thickness at which graphite was believed to behave as a normal, bulk semimetal2. We attribute this observation to a dimensional reduction of electron dynamics in high magnetic fields, such that the electron spectrum remains continuous only in the field direction, and only the last two quasi-one-dimensional Landau bands cross the Fermi level3,4. Under these conditions, the formation of standing waves in sufficiently thin graphite films leads to a discrete spectrum allowing the QHE. Despite the large thickness, we observe differences between crystals with even and odd numbers of graphene layers. Films with odd layer numbers show reduced QHE gaps, as compared to films of similar thicknesses but with even numbers because the latter retain the inversion symmetry characteristic of bilayer graphene5,6. We also observe clear signatures of electron–electron interactions including the fractional QHE below 0.5 K.