Don't you hate recipes that call for 1/2 an onion or 1/4 an onion? I do. What am I going to do with the rest of the onion? I do batch cooking, so it will be a long time before I get to using up the rest of that onion. I used to just throw the whole onion in, but that often times would upset the flavor balance.
But then I figured it out: dehydrate the onion.
Now, I do it the "oh hi extra appliance" way. I have a countertop dehydrator that I bought, used, off of Criagslist (but today I'd do Facebook Marketplace, too) for $30, that has seen me well. I dice the onion, toss it on the dehydrator trays, plug the dehydrator in, and go about my life, pretending that my kitchen doesn't suddenly sound like a wind tunnel. It's white noise. Yes, that's what it is. A white noise machine. Did that work?
But you don't need a separate dehydrator. If you live in a small space, but have an oven (and in this a toaster oven totally counts), just dice the leftover onion, put it in anything ovenproof that has an open top (your favorite brownine pan, a cookie sheet, a pizza pan, a pizza stone, your oven rack wrapped in aluminum foil, a roasting pan, a bunt cake form ... you get the point) and toss it in the oven on your oven's lowest possible setting. Then set yourself a reminder that your oven is on (it'll take so long to dehydrate that you risk forgetting) and walk away from it for at least 24 hours.
If you need to use your oven in the interim, remove your dehydrating onion, do your oven thing, put your oven back on low, and toss the onion back in.
Stop dehydrating the onion when it is clear to you that this is all the way totally and completely dry. If you have to ask, it isn't. You'll know. There will be no doubt.
Sure, it might take the better part of a week, but now you have shelf-stable, keeps forever onion that you can use in any dishes in the future in place of a fresh onion (plus it has a more pungent onion flavor when you do, if'n you love you some onion flavor).
The replacement ratio for dehydrated onion to fresh is:
every 1/4 of a fresh onion the recipe calls for = 3/4 tsp dehydrated onion flakes
every 1 fresh onion the recipe calls for = 1 Tbsp dehydrated onion flakes
.
.
But wait, there's more! If you have a blender or spice grinder (or even a coffee grinder you are willing to be adventurous with), toss your dehydrated onion flakes in to that sucker and give it a grind. This will allow you to store your leftover onion more compactly, and you'll still use the replacement formulas above. But also, you can then use your leftover, dehydrated onion as a replacement for the spice known as Onion Powder (because, hey, guess what onion powder is?) as well. Double win.
Tools to Make This Easier
If you purchase from these links, a nonprofit gets a donation without your price increasing at all. But that's not why they are here. They are here for illustrative purposes.
Countertop dehydrator. This is the exact one I have.
Blender with spice grinder function. (I'm very pro on multitaskers.) This is the exact one I have.
Hand held unitasker spice grinder. (This one can be a multitasker if you live in a place where recreational cannabis is legal.)