Context. Previous studies have concluded that low- and intermediate-mass stars cannot account for the interstellar dust yield in the Magellanic Clouds inferred from far-infrared and sub-millimetre observations. Aims. Luminous blue variable stars (LBVs) form dust as a result of episodic, violent mass loss. To investigate their contribution as dust producers in the Magellanic Clouds, we analyse 31 confirmed and candidate LBVs from a recent census. Methods. We built a maximally complete multi-wavelength dataset of these sources from archival space telescope images and catalogues from near-infrared to millimetre wavelengths. We also present new Very Large Telescope VISIR observations of three sources in the Large Magellanic Cloud (LMC). We review the LBV classification on the basis of the infrared spectral energy distribution. To derive characteristic dust parameters, we fitted the photometry resulting from a stacking analysis, which consists of co-adding images of the same wavelength band of several targets to improve the signal-to-noise. For comparison we also stacked the images of low- and intermediate-mass evolved stars in the LMC. Results. We find four classes of sources: (1) LBVs showing mid-infrared dust emission plus near-infrared free-free emission from an ionised stellar wind (Class 1a) or only mid-infrared dust emission (Class 1b); (2) LBVs with a near-infrared excess due to free-free emission only (Class 2); (3) objects with an sgB[e] classification in the literature, displaying a distinctive hot dust component; and (4) objects with no detected stellar winds and no circumstellar matter in their SEDs. From the stacking analysis of the 18 Class 1 and 2 objects in the LMC, we derived an integrated dust mass of 0.11−0.03+0.06 M⊙. This is two orders of magnitude larger than the value inferred from stacking 1342 extreme-asymptotic giant branch stars. The dust mass of individual LBVs does not correlate with the stellar parameters, possibly suggesting that the dust production mechanism is independent of the initial stellar mass or that the stars have different evolutionary histories. The total dust yield from LBVs over the age of the LMC is ∼104 − 105 M⊙. The one order of magnitude uncertainty is mainly due to uncertainties of the LBV population, star formation history, and initial mass function. Conclusions. LBVs are potentially the second most important source of dust in normal galaxies. The role of dust destruction in LBV nebulae by a possible subsequent supernova (SN) blast wave has yet to be determined. Recent theoretical developments in the field of dust processing by SN shocks highlight the potential survival of dust grains from the pre-existing circumstellar nebula.