Cryptographic protocols enhance online security by encrypting data during transmission, ensuring only the intended recipient can decrypt and access it, thereby protecting against eavesdropping and data breaches.