[DECRYPT AN OPENSSL .ENC FILE]

Files made with openssl enc or CryptoJS, decrypted in your browser with their password.

Many .enc files are made with the openssl enc command — in backup scripts, CI pipelines and tutorials — or with CryptoJS in web apps. They start with the 8 bytes Salted__ (or U2FsdGVkX1 once Base64-encoded). Drop one below and enter its password: the right settings are detected automatically and the file is decrypted on your device, without OpenSSL installed.

[IDENTIFY A FILE]

Only the first 1 MB and the last 64 KB are read, inside your browser. Nothing is uploaded.

[WHAT WORKS]

  • Ciphers: aes-256-cbc (OpenSSL's usual choice) and aes-128-cbc.
  • Key derivation: -pbkdf2 (any -iter count), and the legacy password hashing of OpenSSL 1.0 (-md md5) and OpenSSL 1.1+ without -pbkdf2 (-md sha256).
  • Encodings: binary files and Base64 (-a), including the strings produced by CryptoJS.AES.encrypt(text, password).

Not supported: files made with -nosalt or with a raw -K/-iv key, aes-192 (browsers do not implement it), and other ciphers such as CTR, GCM, DES or ChaCha20. Use the OpenSSL command line for those.

[WHY "BAD DECRYPT" HAPPENS]

The file records the salt but not how the password was turned into a key, so the decrypting side has to use the same options as the encrypting side. Three mismatches cause almost every bad decrypt error:

  • The default changed in OpenSSL 1.1.0. Before it, openssl enc derived keys with MD5; since then it uses SHA-256. A file made on an old server needs -md md5 on a new one.
  • -pbkdf2 on one side only. It must be used for both encryption and decryption, with the same -iter count (10,000 when not given).
  • A different cipher. A file encrypted with -aes-128-cbc will not open with -aes-256-cbc.

The tool above tries every combination of these for you and shows the matching command once it succeeds.

[DOING IT ON THE COMMAND LINE]

# Modern files (OpenSSL 1.1.1+ with -pbkdf2)
openssl enc -d -aes-256-cbc -pbkdf2 -in file.enc -out file

# Files made by OpenSSL 1.1.0+ without -pbkdf2
openssl enc -d -aes-256-cbc -md sha256 -in file.enc -out file

# Files made by OpenSSL 1.0.x, and CryptoJS output (add -a for Base64)
openssl enc -d -aes-256-cbc -md md5 -a -in message.txt -out message

OpenSSL is preinstalled on macOS and Linux. On Windows it comes with Git for Windows (in Git Bash).

[HOW TO DECRYPT AN OPENSSL .ENC FILE ONLINE]

Decrypt a file made with openssl enc or CryptoJS, in your browser.

  1. Drop the file. Choose the .enc file, or a .txt file containing CryptoJS / openssl -a output. It is not uploaded.
  2. Enter the password. Type the password used to encrypt it and press Decrypt.
  3. Save the result. The decrypted file downloads automatically. The matching openssl command is shown in case you need it again.

[FREQUENTLY ASKED QUESTIONS]

Is the file or password sent anywhere?

No. Decryption uses your browser's built-in Web Crypto API. The file and password stay on your device.

Can it decrypt an OpenSSL file without the password?

No. AES with a reasonable password cannot be broken, and the password is not stored in the file. Without it, the file cannot be opened by this tool or any other.

How do I know my .enc file came from OpenSSL?

Open it in a text or hex editor: an OpenSSL file starts with the characters Salted__. If it starts with ENCF it came from CryptFile.Online; anything else came from another program, and the encrypted file identifier will tell you which.

The download is garbage. What went wrong?

Very occasionally a wrong combination of settings passes the padding check. Open Settings, choose the key derivation and cipher you believe were used, and decrypt again.