Free, self-hosted AI code converter, JavaScript deobfuscator, code explainer and beautifier.
Project website · Installation · MIT License
No account. No limits. Bring your own API key.
CodeConvert Pro is a free, MIT-licensed, self-hosted developer tool for converting source code between 25+ programming languages, decoding obfuscated JavaScript, explaining unfamiliar code, adding comments and formatting source files. It supports local AI models and bring-your-own-key cloud providers. Decode and beautify run locally without an AI service.
Choose from six modes:
| Mode | What it does | AI? |
|---|---|---|
| 🔓 Decode | Unpacks fully-obfuscated JS locally via synchrony — string arrays, control-flow flattening, hex/unicode escapes | No (offline) |
| 🤖 Deobfuscate & Rename | AI renames every minified _0x1a2b identifier into something readable, behavior-preserving |
Yes |
| 🔄 Convert Language | Translates code between 25+ languages | Yes |
| 📖 Explain Code | Step-by-step Markdown walkthrough of what code does | Yes |
| 💬 Add Comments | Documents code in-place without changing logic | Yes |
| 🎨 Beautify | Formats JS/TS/JSON/CSS/HTML/YAML with Prettier — no network | No (offline) |
- Zero account required — your API key goes directly to the provider, nothing is proxied through a third-party server.
- Bring any AI model — OpenAI, Anthropic, Google Gemini, OpenRouter, Groq, Together AI, Ollama (local, 100 % offline), LM Studio, or any OpenAI-compatible endpoint.
- Streaming output — results appear token-by-token as the model generates them.
- Continue button — pick up a cut-off response right where it stopped.
- Reuse context — keeps renamed identifiers consistent across large files processed in chunks.
- Local history — last 50 operations stored in your browser; one-click restore.
- Light / dark theme — instant toggle, preference remembered.
- Syntax-highlighted editors — CodeMirror 6 with per-language highlighting.
- Export / import providers — back up and share your provider config as JSON.
Light mode — Convert tab
- Node.js 18.18+ (LTS 20 recommended)
node --version # should be ≥ 18.18git clone https://github.com/Sunilmehra21/codeconvert-pro.git
cd codeconvert-pro
npm installnpm run devOpen http://localhost:3000 — that's it.
For a production build:
npm run build && npm run start
- Click the gear icon (top-right) → Add provider.
- Pick a template from the list:
| Provider | Notes |
|---|---|
| OpenAI | Paste your sk-… key, confirm model (e.g. gpt-4o) |
| Anthropic | Paste your sk-ant-… key, use claude-3-5-sonnet-20241022 |
| Google Gemini | Paste your Gemini API key |
| OpenRouter | One key → access hundreds of models including free tiers |
| Groq / Together | Fast inference, generous free tiers |
| Ollama | 100 % offline. Install Ollama, then: ollama pull qwen2.5-coder:7b |
| LM Studio | Start its local server, use the template as-is |
| Custom | Any OpenAI-compatible endpoint (vLLM, LocalAI, text-gen-webui…) |
- Click Fetch models to load the provider's model list, then Test connection to verify everything works.
- Set it Active and close Settings.
Tip for deobfuscation: Use a strong model (
gpt-4o,claude-3-5-sonnet, orqwen2.5-coder:32b) and keep temperature at 0.1–0.3 for deterministic renames.
1. Paste obfuscated JS → Decode tab → run (local, no AI)
2. Click "Send to input" → switch to Deobfuscate tab
3. Run → AI renames all identifiers meaningfully
4. Large file? → enable "Reuse last result as context"
for consistent naming across chunks
5. Response cut off? → click Continue to resume
Browser (Next.js App Router + React 19 + Tailwind)
│
├── Decode / Beautify ──► Node.js (synchrony / Prettier) [offline]
│
└── AI modes ──► POST /api/convert
│
▼
OpenAI / Anthropic / Gemini / Ollama …
│ (streaming response)
▼
Live token stream → output editor
| Path | Purpose |
|---|---|
app/page.tsx |
Main UI, all state, streaming client |
app/api/convert/route.ts |
Streaming AI proxy |
app/api/decode/route.ts |
Local synchrony full-decode |
app/api/beautify/route.ts |
Local Prettier formatter |
app/api/models/route.ts |
List a provider's available models |
app/api/test/route.ts |
Provider connectivity / auth check |
app/api/config/route.ts |
Read/write data/settings.json |
lib/providers.ts |
Per-provider streaming + model listing |
lib/prompts.ts |
System prompts (deobfuscation, continuation…) |
lib/storage.ts |
localStorage + server-file settings sync |
lib/defaults.ts |
Provider quick-start templates |
lib/languages.ts |
Language list + CodeMirror highlight map |
components/ |
CodeEditor, SettingsModal, HistoryPanel, Icons |
- Your keys stay local. API keys are stored in your browser's
localStorageand optionally mirrored todata/settings.json(gitignored). Nothing is sent to any third party other than the AI provider you explicitly choose. - Decode & Beautify are 100 % offline — code never leaves your machine.
- Ollama / LM Studio make all AI modes offline too.
- Do not deploy this to a shared/public host with your API keys in it.
| Problem | Fix |
|---|---|
| "No AI provider configured" | Add one in Settings and set it Active |
| 401 / 403 from provider | Wrong or expired API key, or wrong Base URL |
| 404 model not found | The model ID doesn't exist for that plan — update it in Settings |
| Ollama connection refused | Run ollama serve first; Base URL should be http://localhost:11434 |
| CORS errors | Shouldn't happen — all provider calls go through the local /api/convert proxy |
Issues and PRs are welcome! This is a personal/free tool — keep changes focused and practical.
Released under the MIT License. Free to use and modify, subject to the license terms. No warranty.