A q-ary code of length n, size M , and minimum distance d is called an (n, M, d)q code. An (n, q k , n − k + 1)q code is called a maximum distance separable (MDS) code. In this work, some MDS codes over small alphabets are classified. It is shown that every7} is equivalent to a linear code with the same parameters. This implies that the (6, 5 4 , 3)5 code and the (n, 7 n−2 , 3)7 MDS codes for n ∈ {6, 7, 8} are unique. The classification of one-errorcorrecting 8-ary MDS codes is also finished; there are 14, 8, 4, and 4 equivalence classes of (n, 8 n−2 , 3)8 codes for n = 6, 7, 8, 9, respectively. One of the equivalence classes of perfect (9,8 7 , 3)8 codes corresponds to the Hamming code and the other three are nonlinear codes for which there exists no previously known construction.