Oscar Josef Alin (22 December 1846 – 31 December 1900) was a Swedish historian and politician.
Alin was born in Falun. In 1872 he completed his doctorate and became docent of political science, and in 1882 professor skytteanus of Government and Eloquence at Uppsala University. As professor skytteanus he succeeded Vilhelm Erik Svedelius, whom he also followed in the inspectorship of the university's Västmanland-Dalarna Nation. In September 1888 he was elected a member of the first chamber of the Riksdag, where he attached himself to the conservative protectionist party, over which, from the first, he exercised great authority. He retired from the Riksdag in 1899 to become rector magnificus of the university, but died already at the end of the next year. It is as a historian that Alin is most remarkable. 
Among his numerous works the following are especially worthy of note:
- Bidrag till svenska rådets historia under medeltiden (Upsala 1872);
- Sveriges historia, 1511-1611 (Stockholm, 1878);
- Bidrag till svenska statskickets historia (Stockholm, 1884–1887);
- Den svensk-norsk unionen (Stockholm, 1889–1891), the best book on the Norwego-Swedish Union question from the Swedish point of view;
- Fjerde artiklen af fredstraktaten i Kiel (Stockholm, 1899);
- Carl Johan och Sveriges yttre politik, 1810-1815 (Stockholm, 1899);
- Carl XIV Johan och rikets ständer, 1840-1841 (Stockholm, 1893).
- This article incorporates text from a publication now in the public domain: Chisholm, Hugh, ed. (1911). Encyclopædia Britannica (11th ed.). Cambridge University Press.