Rough electrodeposition, uncontrolled parasitic side-reactions with electrolytes and dendrite-induced short-circuits have hindered development of advanced energy storage technologies based on metallic lithium, sodium and aluminium electrodes. Solid polymer electrolytes and nanoparticle-polymer composites have shown promise as candidates to suppress lithium dendrite growth, but the challenge of simultaneously maintaining high mechanical strength and high ionic conductivity at room temperature has so far been unmet in these materials. Here we report a facile and scalable method of fabricating tough, freestanding membranes that combine the best attributes of solid polymers, nanocomposites and gel-polymer electrolytes. Hairy nanoparticles are employed as multifunctional nodes for polymer crosslinking, which produces mechanically robust membranes that are exceptionally effective in inhibiting dendrite growth in a lithium metal battery. The membranes are also reported to enable stable cycling of lithium batteries paired with conventional intercalating cathodes. Our findings appear to provide an important step towards room-temperature dendrite-free batteries.