AES-256-GCM Encryption and Decryption Tester

Test AES-256-GCM text encryption and decryption in your browser using a passphrase and PBKDF2 key derivation.

// about

About this Tool

This browser-based tester encrypts text with AES-256-GCM and derives a key from your passphrase with PBKDF2-SHA-256. It is useful for learning and local tests, not a replacement for production key management.

How to use it

  1. Enter text to encrypt or paste a payload to decrypt.
  2. Enter the same passphrase and choose Encrypt or Decrypt.
  3. Copy the result, and never reuse a production secret in a public tester.

Why people use this tool

  • Test AES-256-GCM encryption and decryption without uploading plaintext.
  • Use a passphrase and adjustable PBKDF2 iterations for local experiments.
  • The output includes the data needed by this tool to decrypt the payload later.

Frequently Asked Questions

Is this suitable for production secrets?

No. Use a reviewed cryptographic design and managed key storage for production data.

Guides · Security · 7 min read

Hash Functions Made Simple: MD5 vs SHA-1 vs SHA-256 and How to Use Them

Download checksums, Git commit IDs and blockchain addresses are all hash values. This guide explains how hashing differs from encryption and which algorithm to choose for each job.

A hash function takes input of any length and produces a short value of fixed length, called a hash or digest. Whether you hash one word or a multi-gigabyte video, SHA-256 always outputs 256 bits, or 64 hexadecimal characters.

SHA-256("hello")  = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-256("hello!") = ce06092fb948d9ffac7d1a376e404b26b7575bcc11ee05a4615fef4fec3a308b
MD5("hello")      = 5d41402abc4b2a76b9719d911017c592
The three properties of a good hash, why MD5 and SHA-1 are retired for security, and how to use hashes for file integrity and password storage.
Read guide →
Build it with AI

Build this tool yourself with AI

Want your own version of this tool? Copy the work-order prompt into an AI chat, or save the skill file for an AI coding agent. Both describe the features, edge cases and test cases we used when building it.

AI work-order prompt

Paste it as-is into an AI chat such as Claude, ChatGPT or Gemini.

You are an experienced full-stack web developer. Build a web tool called "AES Encryption Tester" that meets the requirements below.

## Goal

Build a tester that encrypts and decrypts text with AES-256-GCM using a password.

## Core features

- Encrypt and decrypt modes
- Derive the key from the password with PBKDF2 and a high iteration count
- Random salt and 12-byte IV for every encryption
- Output salt + IV + ciphertext as one Base64 string
- Copy result

## Inputs

- Plain text or Base64 ciphertext
- Password

## Outputs

- Base64 ciphertext or decrypted plain text
- Summary of algorithm and parameters

## Edge cases and handling rules

- Show 'authentication failed' for a wrong password or tampered ciphertext
- Reject empty passwords
- Explain that the same plain text encrypts differently each time
- Use the Web Crypto API so keys and text never leave the browser

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- Encrypt then decrypt with the same password returns the original
- Changing one character of the ciphertext makes decryption fail
- Encrypting the same input twice gives different output

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Skill (SKILL.md)

Save it as .claude/skills/build-encryption-tester/SKILL.md for AI coding agents such as Claude Code to reuse whenever you build or change this tool.

---
name: build-encryption-tester
description: Use when building or changing a AES Encryption Tester tool. Build a tester that encrypts and decrypts text with AES-256-GCM using a password.
---

# Build: AES Encryption Tester

## Goal

Build a tester that encrypts and decrypts text with AES-256-GCM using a password.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Encrypt and decrypt modes
- Derive the key from the password with PBKDF2 and a high iteration count
- Random salt and 12-byte IV for every encryption
- Output salt + IV + ciphertext as one Base64 string
- Copy result

## Inputs

- Plain text or Base64 ciphertext
- Password

## Outputs

- Base64 ciphertext or decrypted plain text
- Summary of algorithm and parameters

## Rules

- Show 'authentication failed' for a wrong password or tampered ciphertext
- Reject empty passwords
- Explain that the same plain text encrypts differently each time
- Use the Web Crypto API so keys and text never leave the browser
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] Encrypt then decrypt with the same password returns the original
- [ ] Changing one character of the ciphertext makes decryption fail
- [ ] Encrypting the same input twice gives different output

Tips for working with AI

  • Tell the AI your stack (for example React, Vue or plain HTML) on the first line so the code matches your project.
  • Ask it to run the listed test cases and show the results before you accept the code.
  • Never paste real secrets, customer data or API keys into the prompt; use sample values instead.