Triple-click the text on the line below to the clipboard, then copy it to the Clipboard (command-C):
~/Library/Safari/Bookmarks.plist
Quit Safari. Disable Safari synchronization in iCloud, if applicable.
Select
Go to Folder
from the Finder menu bar. Paste (command-V) into the text box that opens, then press return.
A folder window should open with a file named "Bookmarks.plist" selected. Restore the file from a backup that predates the unwanted changes. If you disabled sync, re-enable it and test.