Developing a technology that enables oral vaccines to work efficiently remains a considerable effort since a number of difficulties must be addressed. The key objective being to ensure the safe passage through the harsh conditions within the gastrointestinal tract, promoting delivery that induces enhanced immune response. In the particular case of hepatitis B, the oral formulation in the nanostructured silica SBA-15 is a viable approach. As a result of its porous structure, low toxicity and structural stability, SBA-15 is capable to protect and release the hepatitis B surface antigen (HBsAg), used in the vaccination scheme, at the desired destination. Furthermore, when compared to the currently used injection based delivery method, better or similar antibody response has been observed. However, information about the organisation of the antigen protein remains unknown. For instance, HBsAg is too large to enter the 10 nm ordered mesopores of SBA-15 and has a tendency to agglomerate when protected by the delivery system. Here we report on the pH dependence of HBsAg aggregation in saline solution investigated using small angle X-rays scattering that resulted in an optimisation of the encapsulation conditions. Additionally, X-ray microscopy combined with neutron and X-ray tomography provided full 3D information of the HBsAg clustering (i.e. agglomeration) inside the SBA-15 macropores. This method enables the visualisation of the organisation of the antigen in the interior of the delivery system, where agglomerated HBsAg coexists with its immunological effective uniformly distributed counterpart. This new approach, to be taken into account while preparing the formulation, can greatly help in the understanding of clinical studies and advance new formulations.