Universal Code Protector
Protect your CSS & JavaScript with multi-layer obfuscation and domain lock. Paste code or drop an HTML file β the type is auto-detected and inline CSS/JS are protected automatically.
1
π Privacy: Your code never leaves your browser (except loading the obfuscator library from CDN). All protection runs 100% locally.
β οΈ Honest note: Obfuscation makes code harder to read β it is not unbreakable encryption. Determined users can still reverse-engineer it.
Code Decoder / Formatter
Format, beautify, minify, validate and inspect code.
β οΈ Limitation: Not all obfuscated code can be restored to its original source β formatting makes it readable, it cannot undo real obfuscation.
JavaScript Formatter / Beautifier
JavaScript Minifier
JavaScript Syntax Validator
CSS Formatter / Beautifier
CSS Minifier
CSS Validator
JSON Formatter
Base64 Decode
URL Decode
Remove Extra Whitespace
Code Inspection β Detect Encoded Strings
HTML Tools
Minify, format and encode HTML.
HTML Minifier
HTML Formatter
HTML Entity Encoder
HTML Entity Decoder
CSS Tools
Minify and beautify CSS.
CSS Minifier
CSS Beautifier / Formatter
JavaScript Tools
Minify, beautify and validate JavaScript.
JS Minifier
JS Beautifier / Formatter
JS Validator
Encoding Tools
Base64 and URL encoding / decoding.
Base64 Encode
Base64 Decode
URL Encode
URL Decode
Hash Generator
SHA hashes generated locally with Web Crypto (crypto.subtle).
SHA-256 Hash Generator
SHA-512 Hash Generator
Text Hash Generator
HTML Encrypt / Decrypt
Encrypt HTML into a document.write script. The encrypted output carries a credit comment with your website URL ().
Password Encrypt / Decrypt
Encrypt text with your own password using AES-GCM 256 + PBKDF2 (100,000 iterations, WebCrypto). Output is a portable package string starting with UCP1. β decrypt it anywhere with the same password. Everything runs locally; the password is never stored or sent anywhere.
β οΈ If you forget the password, the text cannot be recovered β AES-GCM authentication also means a wrong password or a tampered package will fail cleanly instead of producing garbage.
JWT Decoder
Decode a JSON Web Token's header and payload (base64url β JSON). Expiry is shown when an exp claim is present.
β οΈ This tool only decodes β it does not verify the signature. Never trust a JWT's contents without server-side verification.
HTML Live Editor / Preview
Write HTML, CSS and JavaScript in one document and preview it live in a sandboxed iframe. Preview updates as you type, or press Run anytime.
Help & Support
A beginner-friendly guide to every tool on this website. Follow the steps in order β no coding experience needed.
π‘οΈ How to protect JavaScript β step by step
- Go to Home / CSS & JS Protector from the menu (β°).
- Paste your JavaScript code into the big editor β or press π€ Upload File and choose a
.jsfile (max 2 MB). - The type is detected automatically (the chip says Detected: JS). You can also tap the JavaScript Protector tab to force it.
- Press π‘ Protect Code and wait a few seconds β the status line says βReadyβ when it is done.
- Your protected code appears in the Protected Output box below, with its size, time and status.
- Press π Copy Output to copy it, or β¬ Download Protected File to save it as a
.jsfile and use it in your website.
π‘ Tip: the editor grows automatically as you paste more code. Press βΆ Expand to make the editor fill the whole screen (press Esc or the same button to exit).
π¨ How to protect CSS β step by step
- Paste your CSS into the same editor β or upload a
.cssfile. - The chip changes to Detected: CSS (or tap the CSS Protector tab).
- Press π‘ Protect Code.
- Copy or download the output.
β οΈ Important: CSS protection output is a .js file, not a .css file. It is a small JavaScript program that injects your CSS into the page at runtime. Add it to your page with a <script src="protected.js"></script> tag instead of a <link> tag.
π How to protect a full HTML file
- Paste a whole HTML page into the editor β or upload a
.htmlfile. - The chip changes to Detected: HTML.
- Press π‘ Protect Code.
- The tool finds every inline
<style>block and protects it as CSS, and every inline<script>block and protects it as JavaScript β then rebuilds your complete HTML page with the protected blocks inside. - The status line tells you how many blocks were protected, for example β2 CSS block(s), 3 JS block(s) protectedβ.
- Download the result as a
.htmlfile and open it β it works like the original page.
Scripts loaded from other files (<script src="...">) are left untouched β protect those .js files separately. If your HTML has no inline CSS or JavaScript, it is encrypted with HTML encryption instead (see below) and the status line says so.
π How Domain Lock works
- Turn the π Domain Lock switch ON.
- Type your domain, for example
example.com(you do not needhttps://β it is removed automatically). - To allow more than one domain, separate them with commas:
example.com, www.example.com, shop.example.com. - Press π‘ Protect Code as usual.
The protected code checks the website address when it runs. On your allowed domain(s) it works normally. On any other domain it shows a βDomain Lock Activeβ message and the code does not run β so nobody can copy your file to their own website and use it. www.example.com is treated as the same as example.com.
π Copy, Download & Upload
- π₯ Paste Code β pastes text from your clipboard into the editor.
- π Copy Input β copies what you pasted, before protection.
- π€ Upload File β loads a
.js,.css,.txtor.htmlfile (max 2 MB) into the editor. Every tool on this website has its own Upload button that loads a file into that tool's input box. - π Copy Output β copies the protected result.
- β¬ Download Protected File β saves the result with the correct extension (
.jsfor JavaScript and CSS protection,.htmlfor HTML protection). - π Clear code β clears the editor. If the code is long, the site asks for confirmation first.
π How to use HTML Encrypt / Decrypt
- Open HTML Encrypt / Decrypt from the menu.
- Paste a small HTML snippet (not a whole page) into the input box.
- Choose a mode: Normal (small output), Full (every character encoded, harder to read) or UTF-8 (best for emoji and other languages).
- Press π Encrypt. The output is a
<script>that writes your HTML back when the page loads β paste it into your page's<body>where the content should appear. A credit comment with the website URL is added on top. - Press βΆ Run / Preview to see the result in a safe preview before you copy it.
- To get your original HTML back later, paste the encrypted script and press π Decrypt.
π§° The other tools β at a glance
- Code Decoder / Formatter β format, beautify, minify, validate and inspect JavaScript, CSS and JSON.
- HTML Minifier / Formatter / Entity Encoder-Decoder β shrink or pretty-print HTML and convert special characters.
- CSS Minifier / Beautifier β shrink or format CSS.
- JavaScript Minifier / Beautifier / Validator β shrink, format or syntax-check JavaScript (validated code is never executed).
- Base64 & URL Encoder / Decoder β convert text to Base64 or URL-safe form and back.
- Hash Generator β SHA-256, SHA-512, SHA-1 and SHA-384 fingerprints of any text.
- Password Encrypt / Decrypt β lock text with your own password (AES-GCM). If you forget the password, the text cannot be recovered.
- JWT Decoder β read a token's header, payload and expiry (decoding only β the signature is not verified).
- HTML Live Editor β write HTML, CSS and JavaScript and watch a live preview update as you type.
β Frequently Asked Questions
Is protection unbreakable?
No β and no honest tool can promise that. Obfuscation makes your code very hard to read and copy, but a determined person can still reverse-engineer it. Never put passwords, API keys or secrets in client-side code, protected or not.
Does my code leave my browser?
No. All processing happens locally in your browser. Your code is never sent to any server (only the obfuscation library is loaded once from the internet).
What if the protection library fails to load?
The site shows a clear error β βProtection library failed to load β check internet connectionβ β and produces no fake output. Reconnect to the internet and try again.
Why does my protected JavaScript not print to the console?
The protection engine disables console output inside protected code on purpose. Your code still runs β only its console.log messages are silenced.
Why is my module code (import / export) not wrapped?
Standalone JavaScript is wrapped so every name can be renamed. Module-style code (import, export, require, module.exports) is left unwrapped so its imports and exports keep working.
Can a decoder restore my protected code?
Formatting tools can make protected code easier to read, but they cannot restore your original source code.
π¬ Need more help? Contact Support
Developer: Sabbir Hasan
βοΈ Support Channel β t.me/AIDeveloperCommunityAbout Developer
Sabbir Hasan
Contact & Social Links
Reach the developer through the channels below.