I want to backup the game engine and my projects cause i want to downgrade from windows 8.1 to 8 how to do this?

How come you wish to downgrade? You are aware that Windows 10 is just around the corner?

Actually you should probably take a step further and downgrade to windows 7 (well more like upgrade XD) lol

Anyway, to backup your project files simply go to your Unreal Projects (by default, that should be in your documents folder) and copy everything to a “safe” folder in another drive.
You can delete all the Intermediate and DerivedDataCache folders inside your projects to reduce the backup size (those folders will be generated again automatically).

If you also want to backup your engine installation and launcher downloads, you can copy the Epic Games folder found in your program files.