The line-in stages in professional gear tend to have a lot of headroom (often +24 dBu, which is over 30 Vpp), and a lot of consumer audio gear has no trouble dealing with hot signals either. So for active audio devices, odds are you can just plug things in directly and attenuate via gain/volume controls (but make sure to dial everything down before plugging things in).
I’d be more careful with laptops and headphones, though. For line input, the simplest possible attenuator is just a pot & two jacks, see “simple attenuator” at http://www.doepfer.de/DIY/a100_diy.htm for how to wire things (you can replace the pot with two resistors, e.g. 2k2 and 1k0). For headphones, a suitable amp or module with a dedicated headphone output (and a dedicated volume control) is probably your best bet.