The objective of this research was to develop an off-line artificial vision system to automatically detect defective eggshells, i.e., dirty or cracked eggshells, by employing multispectral images with the final purpose of adapting the system to an on-line grading machine. In particular, this work was focused on studying the feasibility of identifying organic stains on brown eggshells (dirty eggshell) caused by blood, feathers, feces, etc., from natural stains caused by deposits of pigments on the outer layer of clean eggshells. During the analysis, a total of 384 eggs were evaluated (clean, 148; dirty, 236). Dirty samples were evaluated visually in order to classify them according to the kind of defect (blood, feathers, and white, clear or dark feces), and clean eggshells were classified on the basis of the color of the natural stains (clear or dark). For each sample, digital images were acquired by employing a charged coupled device camera endowed with 15 monochromatic filters (440-940 nm). A Matlab® function was developed in order to automate the process and analyze images with the aim to classify samples as clean or dirty. The program was constituted by three major steps: first, the research of an opportune combination of monochromatic images in order to isolate the eggshell from the background; second, the detection of the dirt stains; third, the classification of the image samples into the dirty or clean group on the basis of the geometric characteristics of the stains (area in pixel). The proposed classification algorithm was able to correctly classify nearly 98% of the samples with a very low processing time (0.05 s). The robustness of the proposed classification was observed applying an external validation to a second set of samples (n=178), obtaining a similar percentage of correctly classified samples (97%).