In a substrate processing apparatus for forming thin layers on a substrate used for an organic light emitting diode, the apparatus includes a mask attaching chamber, a deposition chamber and a mask detaching chamber. The mask attaching chamber, the deposition chamber and the mask detaching chamber are provided with a transferring guide installed thereinside, and a substrate supporter for supporting the substrate moves along the transferring guide in or between the chambers. Thus, a time for processing the substrate and an area for the apparatus may be reduced. Also, the chambers are grouped in one or more, and a gate valve is installed between the grouped chambers for opening and closing a path between the grouped chambers. Accordingly, the chambers may be continuously maintained in a vacuum state when any one of the chambers is repaired.