If your SD card is brand new, then there is no need for formatting it. You can put it in your device and use it without formatting it. Even if it needs something to do with, it will most likely prompt you or format itself automatically.
If you purchase the card online, then there may be a need for formatting it. Formatting erases everything present in the SD card. You can format the SD card by using the phone, but preferably you should do it on your PC because it has built-in format function on Windows or macOS.
Introduction about if SD cards need formatting
If you are selling your SD card, then you should back up your items and erase all the content. You can delete the content manually and then running a utility like Roadkill's Disk Wipe to wipe it thoroughly.
How to Format an SD Card
SD card is a small electronic storage medium. People use it for storage devices, including smartphones, games devices, camcorders, cameras, and even single-board computers such as the Raspberry Pi. It helps store the data safely. SD cards are available commonly in three sizes that are normal, mini, and micro. You can read the guide here: https://www.hugdiy.com/ssd-nand-c-109
Insert the SD Card Into Your Computer
Modern computers have an SD card slot on the side of the computer. The design of the slot is the same size as a normal SD card. There is a need to insert micro and mini SD cards into an SD card adapter to insert them into the computer. You can easily get an SD card adapter that accepts Mini SD cards.
You have to use an SD card reader in case your computer doesn't have an SD card slot. You can get easily in the market as there are hundreds of SD card readers available on the market. They come in many different shapes and sizes. You can simply insert the SD card into the reader and then plug the reader into the USB port on your computer.
You can format the SD card by simply following instructions for all versions of Windows:
Format SD card through windows
There is three easiest way by which you can format an SD card that is as follows:
Open Windows Explorer.
Find the drive letter for your SD card
Right-click, and when the menu appears click Format By following this, the Format screen will appear. FAT32 is the default for the file system, but for the larger cards like 64 gigabytes and up, you should choose exFAT. You can give a name to the formatted drive by entering the name into the Volume Label. After this, click on the Start button. It will show you a warning that will notify you about the formatting of all the data on the drive. Finally, click OK to continue. Now you finally formatted the drive correctly.
Format Write Protected SD Cards
Sometimes there comes an error while formatting the SD card that says that your data is write-protected. Firstly you should check whether the little tab is set on the SD card. You have to remove the SD card from the computer. There will be a little tab at the edge which you can move up and down. If the tab is up, you should move it down, and if it is down, move it up. Now insert the card again and try to format it again. If there is no tab on the SD card, then you can follow this instruction:
If your computer has Windows 8, then you can right-click the Start button and then click Command Prompt or Admin.
But if you have XP, Vista, or Windows 7, then you have to press the start button and right-click on the Command Prompt option and choose Run as administrator. You have to navigate through the menus for finding the Command Prompt icon.
Now type disk part or type list disk
It will show you a list of all the available disks on the computer. You should note the disk number that resembles the size of your SD card.
Now type select disk n. At the place of n, you should add a number of the disk for the SD card.
After that, type attributes clear disk read-only. Then type clean and after that type exit to exit disk part.
Now by using Window Explorer Format, the SD card again according to the previous step.
There is no need to follow the above steps if your SD card has a physical tab on the SD card. In this case, you just need to change the position of the tab to read-only on and off.
This article tells you about which types of cards need formatting and how to format the SD card manually or by using Windows.