The invention relates to an alkane sulfonic acid or alkane sulfonate composition, which composition comprises an alkane substituted by a sulfonic acid or sulfonate group, wherein the alkane has an average carbon number in the range of from 16 to 30. Further, the invention relates to a method of treating a hydrocarbon containing formation using such composition as surfactant.