The utility model relates to an electronic guardrail lock in the field of guardrail locks, which comprises a box body and a circuit board arranged in the box body, the box body is internally provided with an
insertion hole for a
plunger latch to penetrate through, the box body is provided with a driving piece through a containing groove, the box body is internally provided with a first sliding groove communicated with the containing groove, and a slidable locking piece is arranged in the first sliding groove. A locking hole is formed in the locking piece, an induction piece is arranged in the box body through a second sliding groove, a positioning hole communicated with the inserting hole is formed in the induction piece, the circuit board is electrically connected with a detection switch used for detecting inserting or pulling-out of the
plunger latch, and elastic force continuously far away from the detection switch is provided for the induction piece through a first elastic piece in the box body. When the
plunger latch is inserted, the
insertion end of the plunger latch sequentially penetrates through the locking hole and the positioning hole and extrudes the induction piece, the induction piece is forced to move along the second sliding groove and triggers the detection switch, compared with a traditional magnetic induction mode, the actual
insertion state of the plunger latch can be accurately fed back, and the using effect and practicability are improved.