Combine salt and 2 cups of water in a large glass bowl. Stir until salt dissolves. Peel skin from onions, leaving onions whole. Add to salted water. Cover. Stand at room temperature overnight.
Drain onions. Rinse under cold water. Pack into sterilised jars, layer with salt and pepper, plus any other spices of your choice.
Place vinegar, sugar and pickling spice into a saucepan over low heat. Cook, stirring, for 15 minutes or until sugar has dissolved. Bring to the boil for a few minutes then remove from heat.
Pour hot liquid into your jars making sure that all of the onions are covered but also ensuring there is about 1cm of extra space at the lid of the jar. You may need to reorganise your onions to achieve this. Seal the lid tightly.
This next step is a pro tip that is often forgotten. You need to heat-treat your jars so that they properly seal themselves - this will extend shelf life from about a month to around a year! So, grab the largest, tallest pot you have (a pasta pot is great for this) and line the bottom with a tea towel and place your jars on top. You need to ensure that they are not cluttered and they aren't touching the side of the pot. Cover the jars completely or to at least two-thirds with water that is a similar temperature (otherwise the glass will be shocked and break). Gently boil for anywhere between 10-20 minutes, depending on the size of your jar. The tops should puff up a bit and become concave. Take them out of the hot water and wipe them down.