It would be (roughly) five kilometers in diameter.
The Milky Way is 100,000 light years in diameter (1 followed by five zeros, or 1e5). The Observable Universe is (roughly) 100 billion (100,000,000,000) light years in diameter (1 followed by eleven zeros, or 1e11). Divide the Universe diameter by the Milky Way diameter to get the proportion. 1e11/1e5 = 1e6. So the Universe has 1,000,000 (a million) times the diameter of the Milky Way.
If a pea is 5 millimeters in diameter, multiply by a million to get 5,000,000 mm. There are a million mm in a kilometer, so… five kilometers in diameter! — about three miles.
Amazingly small, when you think of it.
In our local group of galaxies, galaxies are (roughly) 25 times their diameters distant from each other. So the nearest galaxies to this pea-galaxy would be 5 x 25 = 125mm (five inches) away. For the universe as a whole, the average distance would be around 400mm (16 inches).
Picture: Structure of the Universe. Every bright pixel is a galaxy. This image is one billion light years across (1/100 of the diameter of the Observable Universe) Created by the Max Planck Institute in Germany