The Swiss Confederacy was a federation of states, named "cantons"; it was formed over time, starting in the middle ages, as different communities in the Alps developed a series of alliances.
It was a part of the Holy Roman Empire but it fought against the Habsburgs and did gain independence. That was formally recognized as an independent state by the europeans powers in 1648 at the Peace of Westphalia.
In Italy, the republics of Venice and of Genua were born as city states, mainly concerned with sea trade within the Mediterranean Sea.
Later, after the discovery of America and of the route to India around Africa, the Mediterranean become a bit of a backwater, and both cities expanded over land. Venice in particular did gain vast territories, expanding to the west nearly to Milan and controlling the eastern coast of the Adriatic Sea (Dalmatia).
The were some other small republics in Italy, that based on the city state of Lucca and the tiny city state of San Marino (which is still existing today !). Also there were some city states that were nominally members of the Holy Roman Empire in Germany, but that in practice were mostly autonomous.
Keep in mind that those republics could all be defined as oligarchies: the power was concentrated in the hands of the members of a very small number of wealthy families, mostly very successful trading houses. Membership in the ruling councils was mainly by co-optation by the existing members, only extended to members of the families.
So nothing like the suffrage that was established in the United States, that was certainly not universal at the start but that was mush more effective and direct.
Also, many of those entities were destroyed by the revolutionary and napoleonic wars and the by the Congress of Vienna, with the exception of the Swiss confederacy. Venice was given to Austria, Lucca to the Duchy of Parma, Genua to the Kingdom of Savoy and Sardinia.
Commenters: Please keep in mind that top-level answers at /r/AskHistorians should be informative and comprehensive. Answers will be removed if they are only a single sentence long.
The Netherlands was a republic from 1581 to 1795. However, it's not exactly what we think of when we think of a modern republic. Federalist #20 covers Madison's thoughts on it's structure.