Protect Your Code Before
Sending to AI

CodeMask is a local-first tool that masks sensitive identifiers and text before sending content to LLMs, with full reversibility. Keep your secrets safe while leveraging AI.

CodeMask Application Screenshot
🔒 100% Local 🆓 Open Source ⚡ Fast & Secure
Before → After
function login(user, password) {
const apiKey = "sk-1234567890abcdef";
return authenticate(user, password);
}
function v6g9j2r41m5qk(v7h0k3s42n6rl, v8i1l4t53o7sm) {
const v9j2m5u64p8tn = "MASKWORD_XCXXGELMIH65";
return v0k3n6v75q9uo(v7h0k3s42n6rl, v8i1l4t53o7sm);
}

Why CodeMask?

🔒

100% Local

Everything runs on your machine. No data leaves your computer. Your secrets stay secret.

🔄

Fully Reversible

Mask your code, send to AI, get response, unmask everything back to original. Perfect roundtrip.

🎯

AST-Aware

Understands code structure. Preserves syntax. Works with JavaScript, TypeScript, Python, and more.

🔑

Encrypted Storage

Mapping stored locally with encryption. Keys in OS keychain. Enterprise-grade security.

Fast & Efficient

Built with Tree-sitter for fast parsing. Handles large codebases efficiently.

🌐

Multi-Language

Supports JavaScript, TypeScript, Python, Java, Go, C++, Rust, Ruby, PHP, SQL, and more.

How It Works

1

Paste Your Code

Copy your code or text into CodeMask. Select the language or use text mode.

2

Mask Sensitive Data

Choose auto-mask or select specific identifiers. CodeMask replaces them with opaque tokens.

3

Send to AI

Copy the masked code and send it to ChatGPT, Claude, or any LLM. Your secrets are safe.

4

Unmask Response

Paste the AI response back into CodeMask and unmask to restore original identifiers.

Download CodeMask

Available for Windows, macOS, and Linux. Download the latest version v1.0.0

Windows

.exe installer (x64)

Download Now
macOS Apple

macOS

.dmg package

Download Now
Linux Tux

Linux

.deb & AppImage

Download Now