Set up and format a Raspberry Pi SD card – step by step

The Best SD Card for Raspberry Pi 5 and 4 – Recommendations 2026

For the Pi 5 we recommend the official Raspberry Pi SD card in 64 or 128 GB, or the Kingston Canvas Go! Plus if you can’t get one. For the Pi 4 and older models the SanDisk Extreme is enough, though the Kingston is faster there too. For cameras and data loggers that write constantly, take the SanDisk High Endurance. If your Pi writes a lot, for example as a Home Assistant or Docker server, put the system on an SSD instead.

In short

The best SD card for the Raspberry Pi is a brand-name microSD card with an A2 rating and 64 GB.

Links marked with * are affiliate links, which makes them advertising. If you buy through one, I earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. Learn more

Best SD cards for Raspberry Pi at a glance

Use caseCardWhy
Raspberry Pi 5, if availableOfficial Raspberry Pi SD card (64 or 128 GB)one of the few cards that run with command queueing on the Pi 5 out of the box; user benchmarks show the 32 GB version is much slower
Raspberry Pi 5Kingston Canvas Go! Plus 128 GB*top tier for small random reads and writes, easy to find
Raspberry Pi 4, 3, ZeroSanDisk Extreme 64 GB*A2 and U3; for small random reads and writes, the Kingston is faster on the Pi 4 too
More room for project dataKingston Canvas Go! Plus 256 GB*the same card with twice the capacity
24/7 with light writes (MQTT broker, controller)Kingston Canvas Go! Plus 128 GB*writes little, but benefits from fast system access
Camera, data logger (writes constantly)SanDisk High Endurance 64 GB*built for constant writing, but no A rating
Media server (Jellyfin, Plex)A2 card for the system, media on a USB hard drivethe card only holds the system and the database, not your library
Databases, Home Assistant, DockerSSD instead of an SD cardPi 5 via NVMe, Pi 4 via USB 3
* Affiliate links (advertising). Learn more

On Amazon, the official card is available as the Raspberry Pi SD Card 128 GB*. The product page at Raspberry Pi lists the approved resellers in your country. It comes in 32, 64 and 128 GB, all rated C10, U3, V30 and A2; according to user benchmarks, the 64 and 128 GB versions are the fast ones.

Ad
Kingston Canvas Go! Plus 128 GB
Kingston Canvas Go! Plus 128 GB
$53.90
Price before sales tax, as of 2026-12-01, 18:50 — prices may have changed since.
Ad
SANDISK 64GB High Endurance Video microSDXC Card with Adapter for dash cam and home monitoring systems - C10, U3, V30, 4K UHD, Micro SD Card - SDSQQNR-064G-GN6IA
SANDISK 64GB High Endurance Video microSDXC Card with Adapter for dash cam and home monitoring systems - C10, U3, V30, 4K UHD, Micro SD Card - SDSQQNR-064G-GN6IA
$25.99 $44.99 −42%
Price before sales tax, as of 2026-12-01, 15:05 — prices may have changed since.

Which SD card for a Raspberry Pi 4 media server?

For a Jellyfin or Plex server on the Pi 4, the SD card only needs to carry the operating system, the server software and its database. A brand-name A2 card such as the SanDisk Extreme 64 GB* is plenty. Your movies and music belong on a USB hard drive or SSD connected to one of the blue USB 3 ports: even a large card fills up quickly, and copying big media files onto the card wears it out for no reason.

With a large library, it’s best to move the system off the card and onto an SSD as well. The Pi 4 boots straight from a USB SSD, so the server’s database and thumbnails sit on faster storage too; see Boot Raspberry Pi without an SD card. On the Pi 5, an NVMe SSD does the same job even faster (more in the SSD section below). Setup guides: Jellyfin on the Raspberry Pi and Plex Media Server on the Raspberry Pi.

Raspberry Pi SD card requirements: size and format

The official Raspberry Pi documentation recommends a card with at least 32 GB for Raspberry Pi OS with desktop and at least 8 GB for the Lite version without a desktop, and suggests leaving room to grow. With 64 GB you have room for updates, Docker images and project data; 128 GB pays off if lots of project data or recordings end up on the card.

At the top end, any card below 2 TB works; beyond that the MBR partition table, the directory at the start of the card where the Pi finds its partitions, no longer fits. Older models have a tighter limit: according to the documentation, the Raspberry Pi Zero, the original Raspberry Pi and early Pi 2 boards with the BCM2836 chip (board marked V1.1; from V1.2 on it has the BCM2837) can only boot from a boot partition of 256 GB or less. For these models, buy 256 GB at most. Whether the card says microSDHC (up to 32 GB) or microSDXC (above 32 GB) doesn’t matter: the Raspberry Pi handles both.

Every model since the Raspberry Pi 1 Model B+ uses microSD cards, including the Pi 5, Pi 4, Pi 400, Pi 500, Zero and Zero 2 W. Only the original Raspberry Pi 1 Model A and B take full-size SD cards; a microSD card in an adapter works there.

SD card symbols explained

Every card carries several ratings, and they describe different things. The speed classes guarantee a minimum speed for continuous (sequential) writing; the A classes describe performance with lots of small, random accesses. That performance is measured in IOPS (input/output operations per second, using 4 KB blocks). The operating system generates this kind of access all the time, for example when launching programs or writing log files.

SymbolMeaningOn the Raspberry Pi
10 in a circle (C10)Speed Class 10: at least 10 MB/s sequential writeminimum requirement
1 or 3 in a U (U1, U3)UHS Speed Class: at least 10 or 30 MB/s sequential writeU3 is standard on good cards
V30Video Speed Class: at least 30 MB/s for video recordingirrelevant for the Pi
A1Application Performance Class 1: at least 1,500 IOPS read, 500 IOPS writea solid baseline on every model
A2Application Performance Class 2: at least 4,000 IOPS read, 2,000 IOPS write, but only with command queueing and cachefull benefit only on a Pi 5 with an approved card
I or II (Roman numeral)UHS bus: UHS-I or UHS-IIthe Pi uses UHS-I; UHS-II cards work, but no faster
microSDHC card with the Speed Class 10 symbol
The 10 in a circle stands for Speed Class 10: at least 10 MB/s when writing.
microSDHC card with the U1 and UHS-I symbols
An older card with U1 and the Roman numeral I for the UHS-I bus. It has no A1 or A2 symbol yet.

The big numbers on the packaging, such as “up to 200 MB/s” on the 64 GB Extreme PRO, are only reached in compatible card readers from the manufacturer.

SD card speed by Raspberry Pi model

How fast a card runs on the Pi is mainly limited by the card slot. The table shows the ceiling of each bus mode. These are not measurements; real-world throughput is somewhat lower.

ModelSD modeCeiling
Raspberry Pi 1, 2, 3 and ZeroHigh Speed25 MB/s
Raspberry Pi 4DDR50 (UHS-I)50 MB/s
Raspberry Pi 5SDR104 (UHS-I)104 MB/s

These limits only apply to reading and writing large files. To see how much cards differ on lots of small reads and writes, check our benchmark comparison of the fastest SD cards on the Raspberry Pi 5.

What this means when buying: on the Pi 4 and older models, a card with high MB/s figures brings no benefit. Only the Pi 5 makes good use of a fast UHS-I card when reading and writing large files.

A1 vs. A2: what does A2 bring on the Raspberry Pi?

On paper, an A2 card handles more than twice as many random operations as an A1 card. The SD Association, however, ties the A2 figures to two features the host device must support: command queueing and a cache on the card. Without that support, the A2 guarantees don’t apply, and what the card delivers depends on the model.

What is command queueing?

Without command queueing, the Raspberry Pi sends the card one request at a time and waits for each result. With command queueing, it can line up several requests, and the card works through them in an overlapping way. This mainly speeds up lots of small reads, such as those during boot and when launching programs.

Which Raspberry Pi uses command queueing?

The Raspberry Pi 1 to 4 don’t support command queueing for SD cards. An A2 card works perfectly there, but its A2 guarantee doesn’t apply. According to the documentation, the official Raspberry Pi card reaches 3,200 IOPS read and 1,200 IOPS write on the Pi 4.

The Pi 5 supports command queueing, but by default it only enables it for cards on an allow-list in the Linux kernel. As of November 2026, that list contains the official Raspberry Pi SD cards and certain newer Transcend cards. For the official card, the documentation lists 5,000 IOPS read and 2,000 IOPS write on the Pi 5. All other A2 cards, including the SanDisk Extreme PRO, get the full bus speed on the Pi 5 but run without command queueing. How fast they are with lots of small reads and writes then depends heavily on the model: the Kingston Canvas Go! Plus comes close to the official card, while the SanDisk Extreme PRO is only mid-range. So when buying: if you can get the official card, take it; otherwise, the Kingston.

The reason for the allow-list: some A2 cards implement command queueing or the cache incorrectly and stop responding. The kernel keeps a separate list of such cards, including early SanDisk Extreme and Extreme PRO cards from 2019 and 2020, and Kingston Canvas Go! Plus cards made between 2019 and 2022. Kingston cards from 2023 onwards aren’t on it.

SD cards for 24/7 use: A2 card, endurance card or SSD?

Flash memory wears out when it is written to, not when it is read. How long a card lasts therefore depends mostly on how much the Pi writes to it, not on how long it runs. A Pi that only switches things or passes readings on via MQTT writes little and is fine with a regular A2 card such as the Kingston Canvas Go! Plus. A camera recording around the clock or a data logger, on the other hand, writes constantly; that is what endurance cards are for. Databases, Home Assistant with history and Docker belong on an SSD (next section).

Endurance cards such as the SanDisk High Endurance* are designed for constant writing. SanDisk rates their durability in hours of video recording, up to 40,000 hours depending on capacity, not in terabytes written. They are meant for dashcams and security cameras that write large video files at a steady rate. They have no A rating, so they are not optimized for speed with the many small accesses of an operating system. The system still runs on them; it gets faster if you put it on an A2 card and write the recordings to an endurance card or a USB drive.

Our SD card lifespan calculator estimates how long your card is likely to last under your write load. Whatever card you use, keep a spare and back up the system regularly; our Raspberry Pi backup guide shows how.

When an SSD beats an SD card

A good SD card is enough for most projects. For servers that write a lot or move large amounts of data, an SSD is the better choice: it is faster and usually handles many times the write load.

On the Raspberry Pi 5, you connect an NVMe SSD via the M.2 HAT+ (2230 and 2242 sizes; the M.2 HAT+ Compact only takes 2230). Officially, the link runs at PCIe Gen 2 with up to 500 MB/s; Pi tester Jeff Geerling measured around 450 MB/s, roughly 4.5 times the SD slot. With PCIe Gen 3, which Raspberry Pi doesn’t certify for the Pi 5, around 900 MB/s is possible, roughly nine times the SD slot.

On the Raspberry Pi 4, the SSD connects via USB 3 and the Pi boots straight from it, as described in Boot Raspberry Pi without an SD card.

If your system already runs from the SD card, you don’t need to reinstall: clone the SD card to an NVMe SSD. To set up a Pi 5 without any SD card, flash the NVMe via USB-C.

Advanced: enabling command queueing for other cards on the Pi 5

For most people it isn’t worth it: even without command queueing, a good A2 card runs at full bus speed on the Pi 5. If you still want to try it with another A2 card, you can relax the allow-list. According to the firmware documentation, the sd_cqe parameter controls this: 0 disables command queueing, 1 (the default) allows it only for approved cards, and 2 for all A2 cards that aren’t known to be faulty. Open the configuration with sudo nano /boot/firmware/config.txt, add this line at the very bottom below [all] (if there is no such section, add an [all] line yourself first):

dtparam=sd_cqe=2

Press Ctrl+O, then Enter to save, and Ctrl+X to exit nano. Then restart the Pi with sudo reboot. Once it’s back up, the following command shows whether command queueing is active. It is if the kernel reports “Command Queue Engine enabled”:

sudo dmesg | grep -i "command queue"

To undo it, delete the line and reboot. The kernel recognizes cards on its fault list by manufacturer and manufacturing date and keeps cache and command queueing off for them even with the value 2. This doesn’t protect you against faults that aren’t on any list: such a card can freeze the Pi or corrupt data. Make a backup first.

How to spot a fake SD card

Fake cards report a larger capacity to the computer than they actually have. You only notice once the card fills up: it then silently overwrites older data, and files or the whole system end up corrupted. These warning signs point to a fake:

  • The price is far below what the brand usually costs, especially for large capacities.
  • The card comes from an unknown marketplace seller rather than the manufacturer or a well-known retailer.
  • The packaging is missing labels, warranty details or a barcode.

Only a test gives you certainty, ideally right after purchase while you can still return the card. On Windows, H2testw fills the free space with test data and reads it back. If it reports errors, the card is smaller than stated or faulty. On Linux and on the Raspberry Pi, the f3 package does the same job. Put the new card in a USB card reader, not in the slot the Pi is booting from:

sudo apt install f3
f3write /media/pi/SDCARD
f3read /media/pi/SDCARD

On the desktop, replace /media/pi/SDCARD with the folder where the card is mounted; lsblk shows it in the MOUNTPOINTS column. f3write fills the free space with test files, f3read then verifies them. Because the whole card is written and read, the test takes a long time depending on capacity and card reader; let it finish. On a Mac, install f3write and f3read with Homebrew (brew install f3).

Raspberry Pi OS Lite doesn’t mount the card automatically. Find it with lsblk by its size (usually sda on a USB card reader) and mount the first partition yourself:

sudo mount /dev/sda1 /mnt
sudo f3write /mnt
sudo f3read /mnt
sudo umount /mnt

However you run it, the “Data OK” line at the end of the f3read output shows how much of the card stores data without errors. Even a genuine card shows less than the printed capacity, because f3 counts in binary gigabytes: a 32 GB card reports about 29.7 GB. What matters is “Data LOST”: anything other than 0.00 Byte means the card is smaller than stated or faulty.

Writing the SD card with Raspberry Pi Imager

The free Raspberry Pi Imager for Windows, macOS and Linux puts the operating system on the card. It downloads Raspberry Pi OS, writes it to the card and can set up your user, Wi-Fi and SSH in the same step. If your computer has no card slot, a USB card reader with USB-A and USB-C* does the job. Our Raspberry Pi Imager guide walks you through it step by step.

Raspberry Pi also sells the official cards with Raspberry Pi OS preinstalled. With your own card reader, though, you can always install the latest version yourself.

Frequently asked questions about SD cards for the Raspberry Pi

What is the best SD card for the Raspberry Pi 5?

The official Raspberry Pi SD card in 64 or 128 GB: it runs with command queueing on the Pi 5 out of the box and is among the top cards in our benchmark comparison. If you can’t get one, take the Kingston Canvas Go! Plus, which is almost as fast and easy to find. The popular SanDisk Extreme PRO is only mid-range on the Pi 5.

Which SD card for the Raspberry Pi 4 and older models?

A brand-name A1 or A2 card rated U3, for example the SanDisk Extreme. The Pi 4 reads the card in DDR50 mode at up to 50 MB/s, so high MB/s ratings on the package bring no benefit there. Cards still differ on lots of small reads and writes, though: the 128 GB Kingston Canvas Go! Plus scores around 75% higher on the Pi 4 than the SanDisk Extreme A2. The Pi 3, Pi 2 and Zero top out at 25 MB/s.

A1 or A2: which do I need?

For the Pi 1 to 4, A1 is enough because these models lack the command queueing that A2 needs for its higher figures. On the Pi 5, A2 only delivers its full benefit with command queueing, which the Pi 5 enables by default only for approved cards such as the official Raspberry Pi card. If you are buying new, take A2 anyway: the card will then suit a later Pi 5 too.

What size SD card does the Raspberry Pi need?

The official documentation recommends at least 32 GB for Raspberry Pi OS with desktop and 8 GB for the Lite version. 64 GB is a sensible default. Cards below 2 TB work; the Zero, the original Raspberry Pi and early Pi 2 boards can only boot from a boot partition of 256 GB or less.

Which card format does the Raspberry Pi use?

Every model since the Raspberry Pi 1 Model B+ uses microSD cards, including the Pi 3, Pi 4, Pi 5 and the Zero boards. Only the original Raspberry Pi 1 Model A and B have a slot for full-size SD cards; a microSD card in an adapter fits there. A microSD card measures 15 × 11 × 1 mm.

Is an SD card enough for a media server?

For the system yes, for the media no. Jellyfin or Plex run fine from a good A2 card, but movies and music belong on a USB hard drive or SSD. On the Pi 4 you can boot the whole system from a USB SSD, on the Pi 5 from an NVMe SSD; the media server’s database and thumbnails then sit on faster storage as well.

How long does an SD card last in 24/7 operation?

That depends mainly on how much the Pi writes to the card, not on how long it runs. There is no fixed number of years; even the makers of endurance cards quote hours of video recording rather than a lifespan. Our SD card lifespan calculator estimates durability for your write load. With heavy writes, an SSD is the more robust solution.

How do I spot a fake SD card?

Be suspicious of very low prices for large capacities, unknown sellers and incomplete packaging. Only a test right after purchase gives you certainty: H2testw on Windows, or f3write and f3read on Linux and macOS, fill the card and check that all data can be read back.

More on this topic: If a card has already failed, see How to recover data from a broken Raspberry Pi SD card. Which media server software suits the Pi best is covered in Jellyfin vs. Plex vs. Kodi.

Sources: Raspberry Pi documentation on SD cards, storage capacity and the M.2 HAT+; Raspberry Pi news on the official SD cards (October 2024); allow-list and fault list in the Raspberry Pi kernel (quirks.h) and the sd_cqe parameter in the overlay README; SD Association on the Application Performance Class; PCIe measurements by Jeff Geerling; SanDisk product specifications (retrieved 12 October 2026).

Similar Posts