My SD card is corrupted

I have a 32 GB SanDisk ultra micro sd card yesterday when i tried to save some photos on the sd card the camera shut off showing an error but it was working well when i changed the storage to i ternal memory i later tried checking the sd card i could copy all the files from the sd card but it wouldn’t format i have tried sd formater and format through cmd but nothing seems to work please help me what can i do

it sounds like the card is write protected. This can occur when the card has detected a fault and locked the card to prevent data loss. backup the data and contact sandisk support to check on the warranty status. 

My sd card is also corrupted but i cant format it how can i erase everything in it i just want my memory back i dont care about the data please help

if the card is in write protect mode it cannot be formatted. it would need to be replaced. 

Is there a switch on the card? Pull it to another side. Or clean the golden finger of memory card/fix the file system for possible errors.