They have to be inside a box but I've only used them for a temporary connection to bypass a switch, which was outside a box.