Acid-base and optical properties of sanguinarine and dihydrosanguinarine were studied in the presence of HCl, HNO3, H2SO4, H3PO4, CAPSO and acetic acid (HAc) of different concentrations and their mixtures. The equilibrium constants pKR+ of the transition reaction between an iminium cation Q+ of sanguinarine and its uncharged QOH (pseudo-base, 6-hydroxy-dihydroderivative) form were calculated. A numerical interpretation of the A-pH curves by a SQUAD-G computer program was used. Remarkable shifts of formation parts of absorbance-pH (A-pH) curves to alkaline medium were observed. The shifts depend on the type and concentration of inert electrolyte (the most remarkable for HNO3 and HCl). The corresponding pKR+ values ranged from 7.21 to 8.16 in the same manner (ΔpKR+ = 0.81 and 0.73 for HNO3 and HCl, respectively). The priority effect of ionic species and ionic strength was confirmed in the presence of NaCl and KCl. The strength of interaction of SA with bioactive compounds (i.e. receptors, transport proteins, nucleic acids etc.) may be affected because of the observed influence of both cations and anions of the inert electrolytes.