We introduce a general technique for decomposing monomial algebras which we use to study the Lefschetz properties. In particular, we prove that Gorenstein codimension three algebras arising from numerical semigroups have the strong Lefschetz property, and we give partial results on monomial almost complete intersections. We also study the reverse of the decomposition process – a gluing operation – which gives a way to construct monomial algebras with the Lefschetz properties.