A washing machine, comprising: a washing machine housing having electrical conducting properties and having an earth connection portion; a leaked water tub having electrical insulating properties and installed in a bottom part of the washing machine housing for accumulating leaked water; an electrode for detecting presence or absence of the leaked water in the leaked water tub; a leaked water detection circuit connected to the electrode, the leaked water detection circuit having an electrical insulating function; and a retaining member having electrical insulating properties and retaining the electrode, characterized in that the washing machine further comprises: an attachment member having electrical conducting properties and attaching the electrode to the washing machine housing via the retaining member, and the attachment member is attached to the washing machine housing to be electrically connected to the washing machine housing grounded via the earth connection portion, and the electrode is retained by the retaining member in a state that a front end of the electrode is directed toward a bottom of the leaked water tub and the attachment member extends downward in the leaked water tub such that in the leaked water tub, a lowest end of the attachment member is positioned on a lower side of a lowest end of the electrode. a washing machine housing having electrical conducting properties and having an earth connection portion; a leaked water tub having electrical insulating properties and installed in a bottom part of the washing machine housing for accumulating leaked water; an electrode for detecting presence or absence of the leaked water in the leaked water tub; a leaked water detection circuit connected to the electrode, the leaked water detection circuit having an electrical insulating function; and a retaining member having electrical insulating properties and retaining the electrode, characterized in that the washing machine further comprises: an attachment member having electrical conducting properties and attaching the electrode to the washing machine housing via the retaining member, and the attachment member is attached to the washing machine housing to be electrically connected to the washing machine housing grounded via the earth connection portion, and the electrode is retained by the retaining member in a state that a front end of the electrode is directed toward a bottom of the leaked water tub and the attachment member extends downward in the leaked water tub such that in the leaked water tub, a lowest end of the attachment member is positioned on a lower side of a lowest end of the electrode. an attachment member having electrical conducting properties and attaching the electrode to the washing machine housing via the retaining member, and the attachment member is attached to the washing machine housing to be electrically connected to the washing machine housing grounded via the earth connection portion, and the electrode is retained by the retaining member in a state that a front end of the electrode is directed toward a bottom of the leaked water tub and the attachment member extends downward in the leaked water tub such that in the leaked water tub, a lowest end of the attachment member is positioned on a lower side of a lowest end of the electrode.