AES Encryption Online - Encrypt & Decrypt AES-GCM/CBC
Free AES encryption tool: encrypt text with AES-GCM or CBC via Web Crypto, PBKDF2-hardened passwords, self-contained Base64 output, decrypt with same password.
Last updated: 2026-11-02
AES Encrypt & Decrypt Online
Result
Note: The tool uses the browser-native Web Crypto API: your password is stretched through PBKDF2-SHA256 for 100,000 rounds into the key, and every encryption generates a fresh random salt (16 bytes) and IV. The output is a single Base64 blob of version + algorithm + salt + IV + ciphertext, so the decrypt side needs nothing but the same password. AES-GCM is recommended: it authenticates the data, so a wrong password or tampered blob fails loudly, while AES-CBC (for legacy systems) usually just yields gibberish on a wrong password. Output formats differ between tools and are not interchangeable. Everything runs on this page; plaintext and password never leave your browser.
How to use AES Encrypt & Decrypt
Encrypt and decrypt AES online with the browser-native Web Crypto API: enter text and a password to produce a self-contained Base64 ciphertext carrying its own salt and IV; paste it back with the same password to decrypt, with the algorithm detected from the data header. Everything runs locally — plaintext and password never leave the page.
- 1
Pick direction and algorithm
Choose Encrypt or Decrypt and keep the default AES-GCM-256 — it authenticates the data and is the modern default. Choose AES-CBC only when the receiving side is a legacy system that expects CBC.
- 2
Enter text and password
For encryption, type the plaintext on the left; any language, symbols and line breaks are fine. Use a password of 12+ characters mixing cases, digits and symbols, and press Show to double-check what you typed.
- 3
Encrypt and copy
The output is one long Base64 string: the first two bytes are the version and algorithm id, followed by a 16-byte random salt, the IV and the ciphertext. Copy and store the whole string; the decrypt side needs only this string plus the same password.
- 4
Decrypt with the same password
Switch to Decrypt, paste the Base64 and enter the original password. The tool reads algorithm and parameters from the header automatically, prints the plaintext and shows which algorithm it detected. Move output to input chains several rounds quickly.
- 5
What a wrong password does
Under GCM a wrong password or a tampered ciphertext fails immediately with a decryption error — that is the integrity check working. CBC has no such check: a wrong password usually produces gibberish without any error, so gibberish means suspect the password.
Key features
Native Web Crypto
Encryption runs on the browser built-in SubtleCrypto, so the AES implementation comes from the platform security layer with no third-party crypto library.
PBKDF2, 100k rounds
The password is stretched through PBKDF2-SHA256 for 100,000 iterations with a 16-byte random salt, so weak passwords resist rainbow-table lookups far better.
Self-contained output
Salt, IV and algorithm id travel inside the Base64 header, so the decrypt side holds exactly one secret: the password.
GCM authentication
AES-GCM carries an authentication tag: tampered data or a wrong password fails loudly instead of quietly returning wrong plaintext.
Common use cases
Sending sensitive details
Encrypt passwords, ID numbers or account details before pasting them into a chat; the other side decrypts in a browser with the shared password and installs nothing.
Backing up private notes
Encrypt recovery codes before storing them in a notes app; if the service leaks, the notes remain unreadable, and decryption depends only on a password you can remember.
Frontend debugging
Generate AES-GCM/CBC sample data on the spot to test Base64 lengths and IV offsets; the header layout is simple, so unpacking it in scripts is easy too.
Classroom demos
Demonstrate symmetric encryption live: flip one ciphertext character to trip GCM, mistype a password to show CBC gibberish — salt and tag concepts land far better than definitions.
Sharing config snippets
Send a colleague a key-bearing config fragment encrypted, and share the password over another channel; the Base64 output pastes cleanly into mail, tickets or chat.
Frequently asked questions
Why is the output different every time?
Each encryption generates a fresh random salt and IV, so encrypting the same text with the same password twice produces completely different outputs — a necessary security property, not a bug. With the same password, any output decrypts back to the same plaintext.
Can a forgotten password be recovered?
No. The AES key is derived from the password with no backdoor and no reset, which is why the tool stores nothing. Keep the password somewhere reliable and ask yourself before encrypting whether you will still remember it in six months.
GCM or CBC — which one?
Prefer AES-GCM-256: it encrypts and authenticates, and a wrong password fails explicitly. Use CBC only when the counterpart system accepts nothing else — often a legacy integration — and remember it offers no tamper protection and does not report wrong passwords.
Can it decrypt output from other tools?
Not directly: this tool emits a self-contained version + algorithm + salt + IV + ciphertext format that does not match the raw ciphertexts of OpenSSL, CryptoJS and friends. Round-tripping within this tool is guaranteed; for cross-tool pipelines follow the other side's format instead.
Are plaintext and password uploaded?
No. Encryption calls browser-native APIs with zero network requests, and the password is never stored — a refresh forgets it. Local computation still assumes a trusted machine: on public computers, press Clear and close the tab when done.
Why must the page be HTTPS or localhost?
The SubtleCrypto interface is only exposed in secure contexts (HTTPS, localhost) by browser security policy. This site runs on HTTPS, so normal access just works; an http mirror would show the corresponding notice instead.
Related tools
Bulk URL Opener
Open a list of URLs in new tabs at once: paste plain lines or any text, extract links automatically, fix missing protocols, dedupe, and export bookmarks.
Morse Code Translator
Translate text to Morse code and Morse back to text as you type. Covers A-Z, digits and punctuation, plays the signal at 5-25 WPM, and includes a full chart.
Online Regex Tester
Free regex tester with live match highlighting, capture group tables and replacement preview. Eight built-in presets, all processed locally in your browser.
HTML CSS JS Formatter
Online HTML, CSS and JS formatter with custom indent, line wrapping and compact mode. Embedded style and script blocks are formatted too, all in your browser.
Color Converter
Free color converter online: switch between HEX, RGB and HSL instantly, with RGB sliders, a live preview swatch, 3-digit shorthand support and one-click copy.
Base Converter
Free base converter with four linked inputs for binary, octal, decimal and hexadecimal, BigInt-exact for huge integers and 12 fractional digits, with a 0-16 reference table.
URL Encoder and Decoder
Free URL encoder and decoder with three modes (component, whole URL, form data), multi-pass decoding and a query parser that exports key-value pairs as JSON.
UUID Generator
Free UUID v4 generator: create 1 to 1000 UUIDs at once with crypto.randomUUID, switch case and hyphens, export as text, JSON or SQL, and download.
Hash Calculator
Free online hash calculator: get MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 for any text or file at once, with per-hash copy and uppercase output.
JSON Formatter
Free JSON formatter: beautify with 2 or 4 spaces, minify, sort keys, and get the exact line and column of a syntax error, plus size, depth and node counts.
