Citric acid is an organic acid commonly present in citrus fruits, but also in various animals and bacteria. A buffer consists of a combination of an acid along with its conjugate base or a base along with a conjugate acid. Buffer solutions help in maintaining the pH of the solution at a near constant value in numerous biochemical experiments. Citrate buffer is made by mixing citric acid along with its conjugate base, sodium citrate. The pH of a citrate buffer generally varies from 1.2 to 6.6.
Calculate the quantity of citric acid and sodium citrate required for you to make the buffer by using an online "Citric acid buffer calculator." For example, a buffer with pH 4 requires 1.3g/liter of citric acid and 1.1g/liter of sodium citrate.
Add the calculated amounts of sodium citrate and citric acid to 1 liter of water and stir it with a stirrer until both are fully dissolved.
Use a pH meter to check the pH of the solution.
Add a few drops of citric acid if the pH of the solution is higher than desired, or add a few drops of sodium citrate if it's lower than desired.
Handle the acid with care, as it may be harmful if inhaled or spilled onto your clothes or body parts.