HTML Code Encrypt Decrypt
This tool helps you how to encrypt and decrypt HTML code. HTML code by converting it into an encrypted format that is not easily readable or accessible by unauthorized. HTML encrypt hide all your HTML source code. protect your HTML-code by using JavaScript encryption
What is HTML Encryption?
HTML encryption is the process of converting the code of your web page content into a special type of code called JavaScript. This JavaScript code is converted into an unreadable format that computers can understand. By doing this, it prevents unauthorized persons from stealing it.
Note that JavaScript must be enabled in your browser to read and run this encrypted code.
Encrypt HTML Code
Paste your HTML code into the text box below. Then, choose either Normal encoding or full encoding for the encoding type. then click on the encrypt button.
Note. Do not add all HTML code including head tag and body tag for encryption.
How To Use This Encrypted Code
Copy and paste the encrypted code into your webpage between the <body> </body>
tag where you want to display it
Decrypt HTML Code
Paste your encrypted HTML code into the text box below. Click on the Decrypt button to see the original code.
Base64 Encode and Decode
Base64 encoding is a method of encoding binary data into ASCII characters. For example, the string "Hello World" when base64 encoded looks like this: "SGVsbG8sIFdvcmxkIQ==". When decoded, it returns the original binary data. Base64 encoding is reversible, meaning you can decode the encoded data back to its original binary form.
It is important to note that base64 encoding method only works on ASCII strings and will throw an error if the input string contains any characters outside the ASCII range.
How to Decode Base64 Encoded Text
This javaScript code helps you decode the encoded text. In JavaScript, atob() is a function used to decode a base-64 encoded string.
The javaScript atob() function accepts a base-64 encoded string as its argument and returns a decoded string.
// base-64 encoded string
const encoded_text = "SGVsbG8sIFdvcmxkIQ==";
// decoding function
const decoded_text = atob(encoded_text);
// result: Hello World!
console.log(decoded_text);
If you want to encode a string to base-64, you can use the JavaScript btoa() function
Here's how you can use atob()
: example code