🔒 HTTPS Explained Like You're 5
Source: Dev.to
Full deep‑dive with code examples
Postcard vs. Sealed Letter
HTTP (no S): Like a postcard
- Anyone who handles it can read it
- Your password could be visible to others along the way
HTTPS (with S): Like a sealed envelope
- Typically only the sender and receiver can read the contents
- Carriers just see a sealed envelope
The S stands for Encrypted. HTTPS uses encryption (via TLS):
Your message: "hello"
↓ encrypted
Sent as: "xK9#mL@pQr!5vB2n..."
↓ decrypted by server
Server sees: "hello"
Anyone in between typically sees only the encrypted data.
How You Know
Look at the URL:
https://usually means your connection is encryptedhttp://means it isn’t
Avoid entering passwords on HTTP sites.
What It Protects
- Passwords and login info (in transit)
- Credit‑card numbers (in transit)
- Personal messages (in transit)
- Any data you send between your browser and the site
Note: HTTPS protects data in transit. It doesn’t make a malicious website trustworthy.
In One Sentence
HTTPS encrypts the connection between your browser and the website, protecting your data from eavesdroppers.