If using salted herring, soak fillets in cold water for several hours, changing the water once or twice. Drain and pat dry.
Cut the herring into bite-sized pieces and set aside.
In a saucepan, combine vinegar, water, sugar, salt, peppercorns, allspice, and bay leaf.
Bring the mixture to a gentle simmer, stirring until the sugar dissolves. Remove from heat and let cool completely.
In a glass jar, layer herring pieces and sliced onions.
Pour the cooled brine over the fish until fully submerged.
Seal the jar and refrigerate for at least 24 hours before serving.
Serve chilled, allowing the flavors to deepen over time.