Skip to content
Tezmy Tools

DES and Triple DES Encryption

Encrypt and decrypt text with DES or 3DES in ECB or CBC mode

Key is
Encrypted bytes as

DES and Triple DES are obsolete. Use them to work with old systems and data, and choose AES for anything new.

Runs in your browser. Nothing is uploaded.

About the DES and Triple DES Encryption

This tool encrypts and decrypts text with the Data Encryption Standard (DES) and with Triple DES (3DES). Pick the mode (ECB or CBC), enter the key as text or hex, choose the padding and read the result as hex or Base64. Triple DES accepts two-key (16 bytes) and three-key (24 bytes) keys. The implementation was checked against OpenSSL for both modes, both key sizes and many message lengths, and against the published DES test values. It runs in your browser, so nothing is sent to a server. DES and 3DES are obsolete, so use them to work with old systems and data rather than to protect new information.

Updated September 2026

How to use the DES and Triple DES Encryption

  1. 1Choose DES or Triple DES, then ECB or CBC, then Encrypt or Decrypt.
  2. 2Enter the key and say whether it is text or hex. DES needs 8 bytes; Triple DES needs 16 or 24.
  3. 3For CBC, enter an 8-byte IV as 16 hex digits, or press the refresh button for a random one.
  4. 4Pick the padding and whether encrypted bytes are hex or Base64.
  5. 5Type your text or paste the encrypted bytes, then copy the result.

How DES and Triple DES work

DES is a block cipher. It cuts the message into blocks of 8 bytes and scrambles each block in 16 rounds using a key of 56 effective bits. Triple DES applies that process three times to each block, which is where its name comes from. Because blocks are only 8 bytes, the ciphers are not suitable for large amounts of data, and they are no longer recommended for new designs.

Choosing modes and padding

  • ECB: each block is encrypted by itself. Simple, but it shows repeated blocks. Use only to match existing data.
  • CBC: each block is mixed with the previous encrypted block, starting from an 8-byte IV. This is the usual choice.
  • PKCS#7: adds 1 to 8 bytes that each hold the number of bytes added. The most common padding and the one that can be checked when decrypting.
  • Zero padding: fills with zero bytes. It cannot tell a real trailing zero from padding, so it is lossy.
  • No padding: your input must already be a multiple of 8 bytes.

Matching another system

When results differ from another program, compare the key bytes first: a text key of the wrong length, a key that is hex in one tool and text in another, and hidden newline characters are the common causes. Then compare the mode, the padding and the IV. Some libraries accept short keys by padding them with zeros; this tool asks for exact sizes so that nothing is guessed silently.

Text is converted to UTF-8 before encryption, so accented characters use more than one byte. Base64 and hex outputs carry the same bytes, only written differently. The Base64 Encoder and Decoder can convert between them, and the Hash Generator can fingerprint the result.

Privacy

Your key and text stay in the page. Nothing is uploaded, stored or logged. Even so, treat any test key you type into a web page as public, and never enter a key that protects real data. For a modern cipher, try AES Encrypt, and for a lightweight scramble the XOR and RC4 Cipher.

Features

  • DES and Triple DES (2-key and 3-key) in ECB and CBC modes
  • PKCS#7, zero or no padding
  • Key as text or hex, with a live byte count and clear size errors
  • Random IV button for CBC
  • Hex or Base64 for the encrypted bytes
  • Verified against OpenSSL output and the standard DES known-answer tests

Frequently asked questions

What is the difference between DES and Triple DES?

DES uses a 56-bit key, which can be broken by brute force in hours with modern hardware. Triple DES runs DES three times in a row, encrypting with one key, decrypting with a second and encrypting with a third, which raises the effective strength. It is slower and still being retired.

What key length do I need?

DES needs exactly 8 bytes. Triple DES needs 24 bytes for three independent keys, or 16 bytes for the two-key form, where the first key is used again as the third. If you type the key as text, each ASCII character is one byte.

Should I use ECB or CBC?

Prefer CBC. In ECB mode identical blocks of text produce identical blocks of output, which leaks patterns. CBC mixes each block with the previous one and needs an 8-byte IV. ECB is here mainly to match older systems and test values.

Why do I get a padding error when decrypting?

With PKCS#7 padding, the last byte tells how many padding bytes to remove. A wrong key, IV, mode or cipher produces garbage, so that last byte is not valid. Check each setting against the side that encrypted the data.

Is the IV secret?

No. The IV does not have to be secret, but it must be the same when decrypting, and should be different for each message. Many systems put it in front of the encrypted data.

Is DES still safe to use?

No. DES has been considered broken for decades, and standards bodies have retired Triple DES as well. Use this tool to read or test old data. For new work, choose AES from a well-known cryptography library.

Related tools