The best SD card for a Raspberry Pi is a 32 GB or 64 GB A1 or A2-rated microSD card from a reputable brand such as SanDisk, Samsung or Kingston, because random read and write speed matters far more than headline sequential speed. For most Pi 4 and Pi 5 projects, a 32 GB card with an A1 or A2 rating and a UHS-I interface is the sweet spot. If your project writes data constantly, choose an endurance card or boot from an SSD instead.
Why Pi performance depends on random I/O
A Raspberry Pi runs its operating system from the card, so thousands of tiny reads and writes happen during boot, package installs and database work. Cards are rated by the Application Performance Class: A1 guarantees at least 1,500 random read IOPS and 500 write IOPS, while A2 guarantees at least 4,000 read and 2,000 write IOPS, according to the SD Association’s specification. Sequential figures such as 170 MB/s are marketing-friendly but matter mainly for copying large files, such as camera footage.
The Pi’s own card slot also limits what you gain. Pi 3 class boards use a slower interface, while Pi 4 and Pi 5 support UHS-I speeds up to about 104 MB/s in the standard mode, so a card faster than that gives little benefit.
Quick comparison of the best Pi SD card options
| Pick | Best for | Key specs | Price range |
|---|---|---|---|
| SanDisk Extreme microSDXC (A2) | Best overall | A2, U3, V30, up to about 190 MB/s read, 32-256 GB | Usually $10-$35 |
| Samsung Pro Plus or Evo Select microSD | Best alternative | A2 or A1, U3, up to about 160-180 MB/s read | Usually $10-$30 |
| SanDisk Max Endurance microSD | Best for 24/7 logging and cameras | Designed for continuous recording, rated in hours of video, 32-256 GB | Usually $15-$40 |
| Raspberry Pi official A2 microSD | Best for compatibility | A2 class, sold in 32-128 GB, preloaded options | Usually $10-$25 |
| Kingston Canvas Select Plus (A1) | Best budget | A1, U1 or U3, up to about 100-150 MB/s | Usually $6-$20 |
Best overall: SanDisk Extreme microSD (A2)
The Extreme line is widely used for Pi builds because it combines an A2 rating with strong sustained write behavior. A 64 GB version gives enough room for the OS, a few services and some logs without leaving you constantly cleaning up. It also works well in action cameras and drones, so it is easy to reuse later.
The trade-off is that the extra speed is only partly used by a Pi, and there is a flood of counterfeit cards at suspiciously low prices. Buy from a seller you trust and run a verification tool after purchase.
Best alternative: Samsung Pro Plus or Evo Select
Samsung cards tend to have consistent random performance, and the Evo Select is a value choice for desktop-style Pi use. If you want something that handles frequent updates, the Pro Plus is the safer pick.
The trade-off is the same as with other brands: you pay for sequential speed that Pi boards cannot always use.
Best for 24/7 duty: SanDisk Max Endurance
Flash cells wear out after a limited number of write cycles. A normal consumer card can fail within months in a Pi that logs every second, while an endurance card is built for heavy recording. It suits security-camera recorders, Home Assistant hubs with large databases, Pi-hole with query logging and weather stations.
The trade-off is lower peak speed and higher cost per gigabyte. For many always-on builds, still consider moving logs to RAM or booting from a USB SSD.
Best for compatibility: official Raspberry Pi card
The official A2 cards are tuned and validated for Pi boards, and they are a straightforward choice if you want fewer unknowns. They are less likely to cause odd boot problems.
Best budget: Kingston Canvas Select Plus (A1)
An A1 card is perfectly adequate for a retro-gaming console, a basic media player or a learning project. It will feel slower to install software but runs fine once set up.
How to choose: a decision matrix
| Your project | Choose | Why |
|---|---|---|
| Desktop-style Pi 4 or Pi 5 | 64 GB A2 card | Faster installs and snappier apps |
| Retro gaming (RetroPie or similar) | 128 GB A1 or A2 card | Game libraries need space; random speed less critical |
| Camera or data logger running 24/7 | Endurance card or SSD | High write volume wears normal cards |
| Pi Zero or small headless project | 16-32 GB A1 card | Low cost, small OS footprint |
| Home server with a database | USB SSD boot | Much better random performance and durability |
Worked example: card lifespan for a logging Pi
Suppose a Pi logs 2 MB per minute to the card. That is 2 x 60 x 24 = 2,880 MB per day, or about 2.9 GB, and about 1,050 GB per year. A 32 GB consumer card with a modest endurance of, say, 500 full-card writes could absorb around 16 TB of writes in theory, which sounds like 15 years. In practice, write amplification from small writes can multiply the real flash writes by 5 to 10 times, shrinking that to 1.5 to 3 years, and a failure can occur earlier. Moving logs to RAM or using an endurance card pushes the lifetime well beyond that. The numbers are illustrative; manufacturers publish their own endurance ratings.
Setup tips that extend card life
- Flash the OS with Raspberry Pi Imager, which verifies the written image and lets you set Wi-Fi and SSH before first boot.
- Use a 5 V supply that meets the board’s current needs (the Pi 4 recommends 3 A and the Pi 5 recommends 5 A), because brownouts corrupt cards.
- Shut the system down properly rather than pulling the power cable.
- Reduce unnecessary writes: disable swap on small cards, send logs to RAM with log2ram-style tools, and avoid frequent database commits.
- Back up the card image once the system is configured, since cloning a working card takes minutes and a rebuild takes hours.
Spotting fake or underperforming cards
Counterfeit cards often report a larger capacity than they hold and lose data when the real storage fills. After buying, test the card with a verification tool such as F3 or H2testw, and check the printed class marks on the card. A legitimate card clearly shows the capacity, UHS speed class (U1 or U3), video class (V10 to V90) and the A1 or A2 mark. If the price looks far below normal for the brand, assume trouble.
Frequently Asked Questions
What size SD card should I buy for a Raspberry Pi?
32 GB suits most projects and 64 GB gives more headroom for desktop use. Raspberry Pi OS itself uses only a few gigabytes, so choose larger only if you store media, games or large logs on the card.
Is an A2 card worth it over A1 for a Pi?
Often yes for desktop use, because A2 guarantees higher random IOPS. Some A2 features rely on host support, so the gain on a Pi can be smaller than the numbers suggest, but A2 cards are usually priced close to A1.
Should I boot a Pi from an SSD instead?
For servers, databases or anything writing constantly, yes. A USB 3 SSD offers much better random performance and endurance, and Pi 4 and Pi 5 can boot from USB in current firmware.
Why does my Pi keep corrupting its SD card?
The usual causes are an inadequate power supply, unclean shutdowns and heavy write loads. Fix the power first, then reduce writes or switch to an endurance card or SSD.
Can I use a 512 GB or 1 TB card in a Pi?
The Pi supports SDXC cards, so large capacities work, usually formatted exFAT or ext4 for the root partition. For the boot volume, a smaller card is cheaper and easier to back up.
Related guides
More from Amazon
Programs that pair well with the guide above. Offers and eligibility are set by Amazon and may change.
A free business account with business pricing and bulk-buying tools for work, shop or home office.
Create a business accountFree shipping on eligible items, Prime Video and more. Eligible new members can start with a free trial.
Start a Prime free trialAudiobooks and podcasts to listen to on the go. Eligible new members can start with a free trial.
Try Audible freeAd-free music streaming. Eligible new subscribers can start with a free trial.
Try Music Unlimited freeAs an Amazon Associate we earn from qualifying purchases.