Top and tail the onions, then peel them whole. Blanch them in a pan of boiling water for about 3 minutes, unit they are just beginning to soften slightly, then drain.
In a separate small pan, add the pickling vinegar, caster sugar and salt. Heat very gently for a minute or two, just until the sugar has dissolved - don’t allow the mixture to become very hot.
Add the onions to a clean jar, and pour over the vinegar. Add the peppercorns, and if necessary, add more vinegar until the onions are completely covered. Store in the fridge. The pickled onions will be ready to eat a few hours later.