---
title: AES-256 Encrypt & Decrypt Text Online
url: https://varstatt.com/toolkit/encrypt
description: Encrypt and decrypt text with a passphrase using AES-256-GCM. Client-side authenticated encryption — nothing is sent to a server.
section: Developer Toolkit (https://varstatt.com/toolkit)
tags: encoding
related: Encrypt (https://varstatt.com/toolkit/encrypt), Base64 (https://varstatt.com/toolkit/base64), Hash (https://varstatt.com/toolkit/hash)
---
# Encrypt / Decrypt

Encrypt and decrypt text with a passphrase using AES-256-GCM. Client-side authenticated encryption — nothing is sent to a server.

## How It Works

1. **Enter your passphrase** — Type a secret passphrase that will be used as the encryption key via PBKDF2 key derivation.
2. **Encrypt or decrypt** — Switch between Encrypt and Decrypt tabs. Paste plaintext to encrypt, or Base64 ciphertext to decrypt.
3. **Copy the result** — Copy the encrypted Base64 output to share securely, or copy the decrypted plaintext.

## FAQ

### What encryption algorithm is used?

AES-256-GCM, an authenticated encryption algorithm. It provides both confidentiality and integrity — tampered ciphertext will fail to decrypt.

### Is my data sent to a server?

No. All encryption and decryption happens entirely in your browser using the Web Crypto API. Nothing is transmitted.

### How is the key derived from my passphrase?

PBKDF2 with SHA-256 and 600,000 iterations. A random 16-byte salt is generated per encryption to prevent rainbow table attacks. Need a strong passphrase? Generate one with the [password generator](https://varstatt.com/toolkit/password).

### Can I decrypt on another device?

Yes. The encrypted output contains the salt and IV needed for decryption. Anyone with the correct passphrase can decrypt it in any tool that implements the same scheme.

## Usage

This tool runs entirely in the browser — visit the URL above to use it.

Prefill inputs via URL parameters:

- `https://varstatt.com/toolkit/encrypt?input=...`

## Related Tools

- [Encrypt](https://varstatt.com/toolkit/encrypt)
- [Base64](https://varstatt.com/toolkit/base64)
- [Hash](https://varstatt.com/toolkit/hash)
