Crotonaldehyde semicarbazone {systematic name: (E)-2-[(E)-but-2-en-1-ylidene]hydrazinecarboxamide}, C5H9N3O, (I), and crotonaldehyde thiosemicarbazone {systematic name: (E)-2-[(E)-but-2-en-1-yldene]hydrazinecarbothioamide}, C5H9N3S, (II), show the same E conformation around the imine C=N bond. Compounds (I) and (II) were obtained by the condensation of crotonaldehyde with semicarbazide hydrochloride and thiosemicarbazide, respectively. Each molecule has an intramolecular N-H center dot center dot center dot N hydrogen bond, which generates an S(5) ring. In (I), the crotonaldehyde fragment is twisted by 2.59 (5)degrees from the semicarbazide mean plane, while in (II) the corresponding angle (with the thiosemicarbazide mean plane) is 9.12 (5)degrees. The crystal packing is different in the two compounds: in (I) intermolecular N-H center dot center dot center dot O hydrogen bonds link the molecules into layers parallel to the bc plane, while weak intermolecular N-H center dot center dot center dot S hydrogen bonds in (II) link the molecules into chains propagating in [110].