Swelling of shale in response to interaction with water is an important consideration within subsurface energy systems. In the case of waste disposal, swelling can provide important barriers around the waste and enhance the sealing ability of rocks. For shale gas exploration purpose, however, swelling may cause wellbore instability. Therefore, a careful study of shale swelling is critical for subsurface energy related applications. Here, the swelling effects of shale were imaged at nanoscale using an advanced synchrotron Transmission X-ray Microscopy (TXM) imaging technique for the first time, with a spatial resolution down to 40.9 nm. Organic matter and clays within the analysed sample were observed to display large swelling effects which resulted in a 50% reduction in porosity. Strain maps generated using Digital Volume Correlation (DVC) show deformation and significant strain were mostly localized to between the contact boundaries of sharp brittle minerals and softer organic matter and clays. This is the first study, to our knowledge, to directly image the swelling deformation of shale at the tens of nanometer scale and provide local information on the strain evolution.