Friend Code

A Friend Code is a unique numeric code that allows the player to communicate directly with a friend's Nintendo DS or Nintendo 3DS network.

The Friend Code has three groups of four digits separated by hyphens, for example 1402-2804-4785.

In Nintendo Switch, it composes of the 'SW' prefix followed by three groups of four digits separated by hyphens. Examples taken are SW-2303-2739-0911 and SW-1000-3826-0200.

UPC-A
To put the 3DS Friend Code in a UPC-A barcode symbology, remove the hyphens and then insert the 12-digit 3DS Friend Code (without hyphens) directly into the barcode. Note that the Friend Code lacks a checksum (as checksum has to do with data transfer, not identification), and because of this, the last digit must not be recalculated. Use a barcode generator that does not calculate checksums automatically, such as http://www.barcodez.net/.

EAN-13
Remove the hyphens and then insert the 12-digit 3DS Friend Code (without hyphens) directly as the first 12 digits the barcode. Note that the last (13th) digit is the check digit and should be calculated, for example 3652136809469 (corresponding to 3652-1368-0946):
 * 6 + 2 + 3 + 8 + 9 + 6 = 34
 * 34 × 3 = 102
 * 3 + 5 + 1 + 6 + 0 + 4 = 19
 * 102 + 19 = 121
 * 121 + 9 = 130 (nearest equal or higher multiple of 10), therefore 13th digit = 9