Japanese swords can most certainly break as they are considered among lightest and thinnest swords in the world. It is only due to the internal structure and differential hardening that they are extremely tough despite their slim figure. Breaking is however not very common since the Japanese sword was specifically designed NOT to break but bend instead.
Luckily, most modern steels are much more resilient and flexible and traditional carbon steels. Chemical additions such as manganese and silicon improve the tensile strength without giving up the the ability to maintain sharpness.
Tamagahane swords - since they are made from iron sand - do NOT have these added elements. To ensure strength and avoid breaking there is a different technique used.
By starting of with a soft / mild steel core (shingane) and laminating it with a hard steel jacket (hagane), internal shocks and impact stress are absorbed and distributed.
The internal structure of a sword is called gitae (or kitae).
There can be found many gitae in history but the most common lamination techniques are maru (no lamination) and kobuse (inner/outer jacket).