4gb memory card converted into 31mb generic raw format.

How on earth this can happen, that a 4 gb sdhc memory card changed into 31mb generic raw format.
I used this card for my nikon d5200. I was transferring pictures in my laptop through a card reader, after that inserted the card in the camera the an error popped out that ’ memory card not formatted, format the memory card’
Card still has the pictures which i didnt transfer. When i again connected my card in laptop, windows said that it can not format the memory card. I also tried to format through disk management from control panel but its not working either. So what are the options I have? I also wanted to recover the pictures from the card.

Too bad, dude. No method can fix this error.

Call SanDisk and get a replacement.