Lost my iphone passcode, if I restore, does icloud get wiped too?

I saved everything to icloud before hand and all my pictures are on my computer already so i'm just nervous about losing my contacts, bu those should be saved to icloud, i'm wondering if I end up having to restore it will my icloud get wiped too or will I be able to get to my contacts again?

Restore deletes all the media on your iPhone.iCloud data is savely stored on apple servers so no it won't get wiped