Officially, the 3DS only supports SD and SDHC cards (of which, the upper limit on SDHC is 32GB). And for out-of-the-box solutions, it is true that 32GB is the largest SD card you can buy.

However, after some digging, it is less that the 3DS does not support SDXC cards (64GB+), but rather that is does not support the exFAT file system that these eXtreme Capacity cards utilize. To get these 64GB+ cards to work on your 3DS (and most any device that only supports SDHC), you must reformat them to use the FAT32 file system.

A quick and easy guide for formatting SD cards I got from here:

This, on the other hand, is the "my hands are as soft as a baby's bottom" method ... (thanks to lynkdead)

1. Place the card in your PC's card reader and determine the drive designation (i.e., G:\ , H:\ , etc.)

2. Download the fat32format utility in GUI version from here: http://www.ridgecrop.demon.co.uk/guiformat.exe .

3. Launch the guiformat.exe .

4. Choose the drive that corresponds to your SD card.

5. Choose the size of the SD Card you are formatting.

5. Check the Quick Format box.

6. Press Start.

And voila !!!

Enjoy your new SD card !!!

Now, while this means that nearly any SD card size is possible, is may not be entirely cost-efective to go whole-hog and get the highest capacity card you can find. Retail 3ds games available for download from the E-shop range from around 512MB-1GB (as of Mario Kart 7, anyway).

If you want to use your 3DS as a make-shift mp3 player (if you do, please use headphones, I'm no audiophile and even I can tell the system's speakers are not the greatest), the included Nintendo 3DS Sound app can only handle about 95-100 files per folder. Not the greatest if you have a large playlist and like to set it to random.

If you intend to use it to convert and watch videos on the go, the ~10 minute restriction on length (in addition to the resolution) means that each video file will not be much more than 120MB (possibly double that for anything in 3D)

Conclusions:

While you can get higher capacity cards to the tune of 64GB and 128GB, most (if not all) 32GB SDHC cards should work properly on your 3DS(XL) out-of-the-box with no extra effort on your part. Unless you plan to more or less exclusively purchase all your 3DS games through the e-shop, to misquote Bill Gates from 1981, "32GB ought to be enough for anybody."