Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Safefile | Secure File Encryptor (Browser-Based)

A simple, secure, and fully offline file encryption tool built with vanilla JavaScript, using modern browser cryptography standards.
No dependencies. No server. No data ever leaves your device. Styled with modest-ui.


Features

  • AES-256-GCM encryption for confidentiality and integrity
  • PBKDF2 with SHA-256 and 100,000 iterations for strong password-based key derivation
  • All operations happen locally in your browser
  • Mobile-friendly, responsive UI
  • Styled with modest-ui — a minimal, themeable CSS component library
  • No build tools, no frameworks — just open index.html and go

How It Works

  1. Choose a file you want to encrypt or decrypt
  2. Enter a secure password
  3. Click Encrypt or Decrypt
  4. The tool:
    • Derives a secure key from your password using PBKDF2 + SHA-256
    • Encrypts/decrypts your file using AES-256-GCM
    • Combines metadata (salt + IV) with the ciphertext
  5. Automatically prompts a secure download of the output file

Why It's Safe

  • Uses the Web Crypto API, built into all modern browsers
  • All encryption/decryption is done in-memory
  • AES-GCM provides both encryption and tamper protection
  • PBKDF2 with 100,000 iterations defends against brute-force attacks

File Format

The encrypted file is structured as follows:

Bytes Contents
0–15 Salt (16 bytes)
16–27 IV (Initialization Vector, 12 bytes)
28+ Ciphertext + Auth Tag

This format allows the decryption tool to re-derive the key and decrypt the file securely.


Usage

Open the App

Just open index.html in your browser — no internet or installation needed.

Encrypting a File

  1. Click Choose File
  2. Enter a password
  3. Click Encrypt
  4. Save the generated .enc file

Decrypting a File

  1. Choose the .enc file
  2. Enter the same password used to encrypt
  3. Click Decrypt
  4. The original file is downloaded with a .dec extension

Requirements

  • A modern browser:
    • Chrome
    • Firefox
    • Safari
    • Edge
    • Mobile browsers supported

Security Tip

Always use a strong, unique password — the tool is only as secure as the password you choose.


License

MIT License — free to use, modify, and distribute.


Credits

Built by Marcus using nothing but love for crypto, privacy, and clean HTML (and a little AI). UI components by modest-ui.

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages