I am looking for a way to overlay an editable grid on top of Windows OS to be able to check if UI elements are aligned.
Does this sort of desktop utility exist?
There are a few "on-screen ruler" programs out there, that is what I use to align things. The one I am using now can be horizontal or vertical, the size adjustable both ways, adjustable transparency. and the "markers" could be set with very long extended lines in the options.
I paid a small price for the one I use, but with a quick google search, and avoiding getting a crudware install, you could probably find a legit free one out there.
checkout Dwarf for a grid, but I think it is overkill for just checking if things are straight or not.
Many screenshot utilities have a mode where the area to be captured can be selected. The crosshairs (horizontal and vertical lines) that are used to select the area can be used to check alignment. You can always abort taking the screenshot if you don't need it, or just let it capture to the clipboard.
One utility that works this way is the free Greenshot screen capture utility.