Chitosan-based thin films were assembled using the layer-by-layer technique, and the axial composition was accessed using X-ray photoelectron spectroscopy with depth profiling. Chitosan (CHI) samples possessing different degrees of acetylation ([Formula: see text]) and molecular weight ([Formula: see text]) produced via the ultrasound-assisted deacetylation reaction were used in this study along with two different polyanions, namely, sodium polystyrenesulfonate (PSS) and carboxymethylcellulose (CMC). When chitosan, a positively charged polymer in aqueous acid medium, was combined with a strong polyanion (PSS), the total positive charge of chitosan, directly related to its [Formula: see text], was the key factor affecting the film formation. However, for CMC/CHI films, the pH of the medium and [Formula: see text] of chitosan strongly affected the film structure and composition. Consequently, the structure and the axial composition of chitosan-based films can be finely adjusted by choosing the polyanion and defining the chitosan to be used according to its DA and [Formula: see text] for the desired application, as demonstrated by the antibacterial tests.