Obfuscated String Decoder
Decode and interpolate configuration files with Clarity-style placeholders. Securely resolve obfuscated strings using local environment variables.
Result will appear here...
About
This tool is a specialized JSON Configuration Interpolator designed to resolve "obfuscated" placeholders within configuration files, following the logic of libraries like Clarity. In modern DevOps and secure development workflows, sensitive data (like passwords or API keys) is often replaced with placeholders in source control to prevent leaks.
The decoder applies a substitution algorithm to merge a Template (containing placeholders like **DB_PASS|default**) with a Source (an environment JSON object). It parses the logic defined by the Key and optional Default value to generate the final, production-ready configuration.
Formulas
The decoding logic follows a strict precedence rule for every string value S found in the JSON structure:
Where E is the Environment object, k is the extracted key, and d is the default value extracted from the syntax **k|d**.
Reference Data
| Placeholder Syntax | Description | Logic |
|---|---|---|
| **KEY** | Strict replacement | Returns Env[KEY] |
| **KEY|default** | Default fallback | Returns Env[KEY] ∨ default |
| **a.b.c** | Nested Access | Traverses Env object depth |
| **MISSING** | Unresolved | Returns original string (if no default) |