Lignin constitutes an ideal precursor for the preparation of porous carbon materials owing to its high carbon content and the abundance of aromatic rings. In the present work, we propose the valorisation of a sodium lignosulfonate (SL) through the production of activated carbons (ACs) by chemical activation with phosphoric acid. Using H3PO4:SL mass impregnation ratios in the range of 0 to 3 and activation temperatures between 400 and 800 ˚C, it is possible to obtain AC with a well-developed surface area (ABET 1290 m2/g) and huge contribution of mesoporosity (Vmes 1.86 cm3/g). The formation of sodium salts during carbonization is also able to imprint additional mesoporosity in the ACs through a hard-templating mechanism. Surprisingly, when SL is submitted to a thermal treatment (250 ˚C) followed by acid washing, the activation in the same operational conditions produces a microporous AC (Vmic 1.08 cm3/g) with an unusually large specific area (ABET 2175 m2/ g). In this way, the porosity of SL-based AC can be easily tuned by a wise combination of inexpensive pre-treatment with the right choice of the operational conditions of the chemical activation process.