The swelling properties of a bentonite MX-80 and a Na montmorillonite obtained from MX-80 purification were analyzed as a function of relative humidity in free and constrained conditions. Gravimetric and XRD techniques were used to study the hydration of powder and compacted pellets in non confined conditions whereas hydration under constrained conditions was investigated in situ by neutron diffraction using a cell specifically designed for the present study. MX-80 bentonite and purified montmorillonite were compacted to an apparent density of 1.7 and equilibrated at various relative humidities using P2O5 and solutions saturated with different salts allowing to work in a wide range of relative humidity between 0 and 0.98.At low relative humidity, the hydration of montmorillonite is similar in free and constrained conditions. For relative pressures higher than 50%, swelling in constrained pellets deviates from that observed for free pellets. Reorientation phenomena of clay layers were also observed for bentonite and montmorillonite starting at 65% RH. At 98% RH, two well-defined basal spacings were obtained in the case of confined bentonite. The major peak corresponds to three-layer hydrates (18.6 Å) and the second one to two-layer hydrates (16 Å). In contrast, only the latter peak is observed when hydration is realized in free geometrical conditions. In the case of Na montmorillonite, for the same relative humidity, the confinement cell did not resist swelling pressure. This was explained by the fact that, for the 1.7 density, porosity was too small to allow the formation of the three layer hydrates to compensate for water swelling pressure.