File Encryption / Decryption

Encrypt and decrypt text or any file in your browser with AES-256-GCM and PBKDF2 — nothing leaves your device.

encryptionsecurityprivacyAES-GCMWeb Crypto

Category: Code & Developer Tools

Operation:
Encrypt:
Key:

Your files and keys never leave your device.

Everything is encrypted locally with window.crypto.subtle (Web Crypto API). No uploads, no server processing — works offline after this page loads.

Privacy-first encryption in your browser

This tool uses the Web Crypto API (window.crypto.subtle) — the same hardware-backed cryptography modern browsers expose to web apps. Your plaintext, passwords, keys, and files are never uploaded to Dynamic Duniya or any third party. After the page loads, you can even disconnect from the network and the tool still works.

What is the JSON envelope?

Every encryption produces a small JSON document that contains everything needed to decrypt later: algorithm name, salt and iteration count (when you use a password), random IV (nonce), and the ciphertext. You can save that JSON as a file, paste it into a note, or Base64-wrap it for transport. Keep it confidential — anyone with the envelope and your password or key can recover the original data.

How to encrypt text or a file

  1. Choose Encrypt, then Text or File.
  2. Enter a strong password, or switch to a raw AES-256 key (32 bytes, Base64). You can generate a random key and store it safely.
  3. Run Encrypt. Copy or download the envelope JSON.
  4. Never share your password or raw key in the same channel as the envelope.

How to decrypt

  1. Choose Decrypt.
  2. Paste the envelope JSON or load the saved .json file.
  3. Enter the same password, or the same raw key, depending on how you encrypted.
  4. Click Decrypt. Text appears in the output panel; files can be downloaded with the original filename when available.

Security notes

  • AES-256-GCM provides confidentiality and integrity — tampering is detected when decrypting.
  • Passwords are stretched with PBKDF2-SHA-256 using a high iteration count (OWASP-aligned).
  • Use a secure context (HTTPS or localhost) so Web Crypto is available.
  • This is a general-purpose utility, not a replacement for audited enterprise key management or compliance programs.

Frequently Asked Questions

Do my files get sent to your server?

No. Encryption and decryption run entirely in your browser. There are zero backend calls for this tool.

Which algorithm does this tool use?

AES-256 in GCM mode for the data, and PBKDF2-SHA-256 with a random salt when you choose password-based encryption.

Can I decrypt on another device?

Yes, if you use a browser that supports Web Crypto and you have the envelope plus the correct password or raw key. The format is self-contained in the JSON envelope.

What if I forget my password?

The data cannot be recovered without the password or raw key. We do not store secrets or backups.

Tips

Quick guidance for using our tools safely and effectively.

Privacy

Files are processed on the server for conversion only and are not used for training or shared with third parties.

Best results

Use the formats suggested in each tool. Large media files may take longer — keep the tab open until processing finishes.

Need something else?

Browse related tools below or explore other categories from the main Dev Tools hub.