Privacy & safety · 5 min read · Updated

How password-protected notes work: encryption explained in plain English

When you lock a note with a password, the text is not hidden — it is transformed into data that is useless without the key. Here is what happens behind the scenes, without the math.

"Password-protected" can mean very different things. In some apps it only means the interface asks for a password before showing a note, while the note itself is stored in readable form on a server. In others, the note is genuinely encrypted, so even someone with full access to the stored data sees only scrambled bytes.

Notepad Free uses the second approach, and it does it entirely inside your browser using the Web Crypto API, a set of cryptography functions built into every modern browser. This guide explains the pieces involved so you know what protection you are getting — and what its limits are.

Encryption in one paragraph

Encryption takes readable data (the plaintext) and a secret key, and produces unreadable data (the ciphertext). Decryption reverses the process, but only with the same key. A good encryption algorithm has a simple property: without the key, the ciphertext reveals nothing useful about the original text, and guessing the key would take longer than anyone can afford.

Step 1: turning a password into a key

Encryption algorithms do not use passwords directly. They need a key of an exact length — for AES-256, that is 256 bits — and it must look random. Human passwords are short and predictable, so the first step is a key derivation function.

Notepad Free uses PBKDF2 (Password-Based Key Derivation Function 2), a widely used standard. It runs the password through the SHA-256 hashing function 120,000 times to produce a 256-bit key. Two details make this strong:

  • A salt. Before deriving the key, a random 16-byte value called a salt is mixed in. The salt is stored alongside the encrypted note — it is not secret. Its job is to make sure the same password produces a different key every time, which defeats precomputed tables of common passwords.
  • Many iterations. Repeating the hash 120,000 times makes each guess slow. You will not notice the delay when you type your password once, but an attacker trying billions of guesses feels it billions of times.

Step 2: encrypting with AES-GCM

With the key ready, the note is encrypted using AES, the Advanced Encryption Standard. AES was selected by the U.S. National Institute of Standards and Technology in 2001 and is used everywhere from banking to messaging apps to the padlock in your browser's address bar.

AES can run in several modes. Notepad Free uses AES with a 256-bit key in GCM (Galois/Counter Mode), which provides two guarantees at once:

  • Confidentiality — nobody can read the note without the key.
  • Integrity — if anyone changes even one byte of the encrypted data, decryption fails instead of producing corrupted text. This is why a wrong password results in a clear "wrong password" message rather than gibberish.

GCM also uses a fresh random 12-byte initialization vector (IV) for every encryption. Like the salt, it is not secret. It ensures that encrypting the same note twice produces completely different ciphertext, so an observer cannot even tell whether two encrypted notes contain the same text.

Step 3: what gets stored

After encryption, the only things saved are the salt, the IV and the ciphertext. The password is never saved, and neither is the key. When you unlock the note, the browser repeats step 1 with the password you type, rebuilds the key, and tries to decrypt. If the password is right, the original text comes back. If not, GCM's integrity check fails and nothing is revealed.

The same principle applies when you share a note with a password or download it as a protected file: the link or file carries only encrypted data, so it can travel through email, chat or cloud storage without exposing the content.

What encryption protects you from

  • Someone browsing your storage. A person who opens your browser's developer tools or copies your browser profile sees only ciphertext.
  • Intercepted links and files. A protected share link or downloaded file is useless without the password, even if it is forwarded to the wrong person.
  • Server breaches. Because encryption happens in your browser and nothing is stored on our servers, there is no central database of notes to leak.

What encryption cannot protect you from

Being honest about the limits is part of using encryption well:

  • Weak passwords. If your password is "1234" or your pet's name, an attacker with the encrypted data can guess it. Key derivation slows guessing; it cannot make a bad password good.
  • A compromised device. Malware or a keylogger on your computer can capture what you type, including the password and the unlocked text.
  • Someone looking at your screen. Once a note is unlocked and displayed, it is readable by anyone who can see it.
  • Forgotten passwords. There is no recovery. Without the password the note cannot be decrypted — by you or by anyone else. That is the guarantee, and also the risk.

How to choose a strong passphrase

Length beats complexity. Current guidance from security bodies such as NIST favors long passwords over short ones stuffed with symbols. A practical approach is a passphrase: four to six random, unrelated words.

  • Good: orbit velvet canyon pickle lamp — long, random, easy to type and remember.
  • Weak: P@ssw0rd! — looks complex but appears in every list of common passwords.
  • Weak: a famous quote or song lyric — long, but predictable to anyone who tries popular phrases.

The words must be chosen randomly — rolling dice with a word list, or letting a password manager generate them — not picked because they mean something to you. And use a different passphrase for different important notes, so one leak does not unlock everything.

Storing the password safely

Because forgotten passwords cannot be recovered, decide in advance where the passphrase lives. A password manager is the best option. For truly critical notes, some people also keep a written copy in a physically secure place. What you should avoid is saving the password in an unprotected note right next to the encrypted one.

Quick summary

  • Your password is turned into a key with PBKDF2, a random salt and many iterations.
  • The note is encrypted with AES-GCM, which also detects tampering.
  • Only the salt, IV and ciphertext are stored — never the password or the key.
  • Everything happens in your browser; no readable text is sent anywhere.
  • The protection is only as strong as your passphrase, and there is no password recovery.

Keep reading

Productivity · 5 min read

How to make a to-do list you will actually finish

A to-do list is the simplest productivity tool there is, and also the easiest to get wrong. These are the habits that separate a list that drives your day from one that just makes you feel guilty.