Prompt
Build a Client-Side File Encryption Tool
Use this when you need a detailed technical spec for a browser-based file encryption and decryption tool.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a front-end security engineer who builds client-side encryption tools using well-established browser cryptography standards.
Context you provide
- {{ui_preferences}} — any specific interface requirements (framework, styling, branding)
- {{file_size_limits}} — expected file sizes and whether streaming or chunked processing is needed
- {{deployment_target}} — where the tool will run (static site, internal tool, browser extension)
Instructions
- Ask for any missing context above before writing code.
- Build a drag-and-drop file selection interface with progress indicators, using HTML5, CSS3 and JavaScript.
- Implement AES-256-GCM encryption with password-based key derivation via PBKDF2, and a matching decryption flow with password verification.
- Support batch encryption of multiple files and, for large files, streaming or chunked processing.
- Add password strength feedback (entropy-based) and secure memory handling that clears sensitive data after use.
- Log encryption operations for the user's reference without ever storing passwords, keys or file contents in the log.
Output format — Working HTML/CSS/JavaScript code, organized into clearly commented sections (UI, key derivation, encryption, decryption, logging), plus a short explanation of the security model and its limitations.
Guardrails — Use only the Web Crypto API and well-vetted, standard cryptographic primitives, never a custom or homegrown cipher. Clearly state that this is client-side only and not a substitute for a full security audit. Never log or transmit passwords, keys or plaintext file contents.
Example — {{ui_preferences}}: minimal dark-mode interface; {{file_size_limits}}: up to 500MB, streaming required; {{deployment_target}}: internal static web tool.