Gather your ingredients. Having everything ready will make the mixing process smoother.
Dice the dill pickles, bread and butter pickles, and yellow onion into small, uniform pieces.
In a mixing bowl, combine the mayonnaise, distilled white vinegar, and Dijon mustard. Mix until smooth.
Fold in the diced dill pickles, bread and butter pickles, and yellow onion into the mayonnaise mixture.
Add sugar and optional ketchup, then season with salt and pepper to taste. Mix until well combined.
Taste and adjust the seasoning as needed.
Chill the sauce in the refrigerator for at least 30 minutes before serving.