From the Autobiography of John Stuart Mill, freely available here:
In this third period (as it may be termed) of my mental progress, which now went hand in hand with hers, my opinions gained equally in breadth and depth, I understood more things, and those which I had understood before I now understood more thoroughly. I had now completely turned back from what there had been of excess in my reaction against Benthamism. I had, at the height of that reaction, certainly become much more indulgent to the common opinions of society and the world, and more willing to be content with seconding the superficial improvement which had begun to take place in those common opinions, than became one whose convictions on so many points, differed fundamentally from them. I was much more inclined, than I can now approve, to put in abeyance the more decidedly heretical part of my opinions, which I now look upon as almost the only ones, the assertion of which tends in any way to regenerate society. But in addition to this, our opinions were far more heretical than mine had been in the days of my most extreme Benthamism. In those days I had seen little further than the old school of political economists into the possibilities of fundamental improvement in social arrangements. Private property, as now understood, and inheritance, appeared to me, as to them, the dernier mot of legislation: and I looked no further than to mitigating the inequalities consequent on these institutions, by getting rid of primogeniture and entails. The notion that it was possible to go further than this in removing the injustice—for injustice it is, whether admitting of a complete remedy or not—involved in the fact that some are born to riches and the vast majority to poverty, I then reckoned chimerical, and only hoped that by universal education, leading to voluntary restraint on population, the portion of the poor might be made more tolerable. In short, I was a democrat, but not the least of a Socialist. We were now much less democrats than I had been, because so long as education continues to be so wretchedly imperfect, we dreaded the ignorance and especially the selfishness and brutality of the mass: but our ideal of ultimate improvement went far beyond Democracy, and would class us decidedly under the general designation of Socialists. While we repudiated with the greatest energy that tyranny of society over the individual which most Socialistic systems are supposed to involve, we yet looked forward to a time when society will no longer be divided into the idle and the industrious; when the rule that they who do not work shall not eat, will be applied not to paupers only, but impartially to all; when the division of the produce of labour, instead of depending, as in so great a degree it now does, on the accident of birth, will be made by concert on an acknowledged principle of justice; and when it will no longer either be, or be thought to be, impossible for human beings to exert themselves strenuously in procuring benefits which are not to be exclusively their own, but to be shared with the society they belong to. The social problem of the future we considered to be, how to unite the greatest individual liberty of action, with a common ownership in the raw material of the globe, and an equal participation of all in the benefits of combined labour.