Database64.js is a protocol‑level library within The Cognitive Web, designed to encode and resolve content using Base64 as a portable, database‑less format.
You can learn more about The Cognitive Web at thecognitiveweb.com.
This library is free to use and can be integrated into any project or website to publish, decode, and interpret Base64‑encoded content.
Database64.js powers the Satellite Intent Platform, a database‑less publishing system built on The Cognitive Web Framework.
Satellite Intent uses this library to deliver self‑contained, portable content capsules across the open web. To explore Satellite Intent, visit satelliteintent.com.
The following is an example of database‑less content decoded by Database64.js
Markup
<script src='https://cdn.database64.com/lib/1.0/database64.js'></script><database-64 content-type="base64" source="V2VkbmVzZGF5LCBOb3ZlbWJlciAyNiwgMjAyNSBhdCAxMDozOSBBTQ0KDQpBdXRob3I6IE1lbHZpbiBIZXJuYW5kZXoNClNpZ25hbCBJZGVudGl0eTogbWVsdmluLmFycm93YXQuaWQNClBsYXRmb3JtOiBBcnJvd2F0DQpBcnJvd2F0IFByb2ZpbGU6IGh0dHBzOi8vYXJyb3dhdC5jb20vbWVsdmluDQoNClNhdGVsbGl0ZSBJbnRlbnQgYSBQdWJsaXNoaW5nIFBsYXRmb3JtIHdpdGhvdXQgZGF0YWJhc2UNCg0KRWFjaCBwb3N0IG9uIEFycm93YXQgUGxhdGZvcm0gaXMgcHVibGlzaGVkIGRpcmVjdGx5IHRvIFNhdGVsbGl0ZSBJbnRlbnQgY2xpY2tpbmcgdGhlIPCfk6EgaWNvbiBvbiB0aGUgcG9zdCB5b3Ugd2lsbCBnbyB0byBTYXRlbGxpdGUgSW50ZW50IGRhdGFiYXNlLWxlc3MNCg0KT24gU2F0ZWxsaXRlIEludGVudCBQbGF0Zm9ybSANCllvdSBjYW4gZW1iZWQgb3IgcG9zdCBhbnl3aGVyZSB0aGUgU2F0ZWxsaXRlIEludGVudCBkYXRhYmFzZS1sZXNzIHBvc3QgYnkgcHJlc3NpbmcgdGhlIGZyYW1lIGljb24g8J-WvO-4jyAgeW91IGdldCB0aGUgaWZyYW1lIEhUTUwgTWFyay11cCByZWFkeSB0byBlbWJlZCBvbiB5b3VyIGJsb2csIHdlYnNpdGVzDQoNCldlIGhhdmVuJ3QgZmluaXNoZWQgeWV0LCBtb3JlIGltcGxlbWVudGF0aW9ucyBsYXRlciwgb3VyIGFwcHJvYWNoIGFuZCBnb2FsIGlzIHRvIGdpdmUgdG9vbHMgdG8gbWFrZSBpdCBtb3JlIG9wZW4gZm9yIEFJIEVyYSBhbmQgT3BlbiBXZWIgd2l0aG91dCBpdCBiZWluZyBsb3N0IGFuZCBtYWtlIGNvbnRlbnQgcGVybWFuZW50LCB0aGUgc2NyZWVuc2hvdCBpcyBhbiBleGFtcGxlIG9mIFNhdGVsbGl0ZSBJbnRlbnQgZGF0YWJhc2UtbGVzcyBvdXRwdXQgZnJvbSBBcnJvd2F0IFBsYXRmb3JtDQoNCiBFeGFtcGxlOg0KIFNhMTc2LnNhdGVsbGl0ZWludGVudC5jb20vY2Fwc3VsZT9vcGVuPVNHVnNiRzhnU1NkdElHUmhkR0ZpWVhObExXeGxjM01nWTI5dWRHVnVkQT09DQoNCk9yaWdpbmFsIFBvc3QgYXQ6IGFycm93YXQuY29tL21lbHZpbi9wb3N0L3RBdDd0S0tsZEZEenFDZ1ZHYVZwQVg1Uk9CbGhKYU5QM1BNcnluWmt1M3B6YURSZ0ZrUzRHZzZiVU1BTlBzMDgyMzY1Mjg2MzE5NzA5ODQwMzJaanVXMTJuZjBCV1M0WUdlRkFjZWFKclIySmZxdGxETmVkYlNrallqWTlWZDhsOFlqTFVvRDhpRkZjT2dGeGQ0M2E1OTg1MTI5NjQ5NGM5ODdlNDgxYWJiYjI1MWRj"
runat="client">
</database-64>
The following section provides a simple demonstration of how database64.js works in practice. This example shows how the library decodes Base64‑encoded content directly in the browser, making it easy to integrate into your own website or project. Because database64.js is a lightweight, protocol‑level tool within The Cognitive Web, it requires no backend, no database, and no special configuration. You can drop it into any HTML page and immediately begin decoding Base64 strings into readable content, structured objects, or embedded capsules. This demo illustrates the core idea behind the library: Base64 becomes a portable container for meaning, and database64.js resolves that meaning instantly on the client side. You can use this same approach anywhere in your own projects—whether you're building a static site, a dynamic application, or a Cognitive Web‑compatible publishing tool.
database64.js is intentionally designed to be universal. It works in:
You can either create your JSON content directly inside a database64.json file and fetch it using the database64.js library, or you can fetch the JSON from any location—even if the data itself is already encoded in Base64. This flexibility is intentional: the library is designed to resolve Base64‑encoded meaning no matter where it lives.
Because of this, you’re not limited to a single hosting strategy. Your Base64 data can come from:
<script> tagdatabase64.js simply takes the encoded content and decodes it into a usable JavaScript object, text block, or structured capsule. This makes it ideal for projects that need:
Whether you're building a traditional website or a Cognitive Web‑native tool, the library gives you a universal way to resolve Base64 content without worrying about backend infrastructure. It’s part of the broader philosophy of The Cognitive Web: content should be self‑contained, portable, and easy for both humans and AI systems to interpret.
Because database64.js operates entirely on the client side, it also works seamlessly in environments where traditional data pipelines are difficult or impossible to maintain. This includes:
The library is intentionally minimal, with no dependencies, so it loads quickly and performs well even under heavy traffic. This makes it suitable for high‑resolution environments like Satellite Intent, where millions of capsules may be resolved across the web without placing any strain on your server.
Another advantage is durability. Because Base64 content is self‑contained, it remains valid even if:
This aligns with the Cognitive Web’s core principle: meaning should outlive platforms.
By using database64.json and database64.js, developers gain a simple, future‑proof way to publish structured meaning that can be decoded anywhere, by anyone, on any system — including AI assistants that rely on deterministic, machine‑readable formats.
See the database64.json content at database64.json
Markup
<database-64 id="productsExample" data-name="data" content-type="json"
source="/database64.json"
runat="server">
<database-64>
<database-64 style="font-weight:bold;text-decoration:underline">Featured Products</database-64>
<br />
<database-64 id="db64products" />
<br />
</database-64>
<script>
productsExample.data.then(productList => {
db64products.innerHTML = `
<strong>Name:</strong> ${productList.products[0].productName}
<br>
<strong>Description:</strong> ${productList.products[0].productDescription}
<br>
<strong>Price:</strong> ${productList.products[0].price}
<br>
<strong>Size:</strong> ${productList.products[0].size}
<br>
<br>
<strong>Name:</strong> ${productList.products[1].productName}
<br>
<strong>Description:</strong> ${productList.products[1].productDescription}
<br>
<strong>Price:</strong> ${productList.products[1].price}
<br>
<strong>Size:</strong> ${productList.products[1].size}`;
});
</script>
</database-64>
Global CDN:
https://cdn.database64.com/lib/1.0/database64.js
Loads the source from client, TEXT required.
Loads the source from server, URL required.
Markup
<database-64 id="plaintexttestclient" content-type="plaintext" source="Hello this is Plaintext from client" runat="client" style="color:red;font-weight:bolder"> </database-64>
Markup
<database-64 id="plaintexttestserver" content-type="plaintext" data-name="data" source="/api_plain_text_test" runat="server" style="color:red;font-weight:bolder"> </database-64>
Markup
<database-64 id="htmltestserver" content-type="html" data-name="data"
source="/Articles/The-cognitive-web"
runat="server" style="color:red;font-weight:bolder">
<script>
htmltestserver.data.then(html => {
// alert(html);
});
</script>
</database-64>
Markup
<database-64 id="htmltestclient" content-type="html" data-name="data"
source="<p>Never Stop <strong style='color:red;text-emphasis:dot'>Dreaming<p>"
runat="client" style="color:blue;font-weight:bolder;">
<script>
// alert(htmltestclient.data);
</script>
</database-64>
Markup
<database-64 id="base64testclient" content-type="base64"
source="SGVsbG8gSSdtIGRhdGFiYXNlLWxlc3MgY29udGVudA=="
runat="client">
</database-64>
Markup
<database-64 id="base64testserver" content-type="base64" data-name="data"
source="/api_base64_test"
runat="server">
</database-64>
Markup
<database-64 id="item1client" data-name="data" content-type="json"
source='{"name":"Alex","lastName":"Hernandez","company":"Arrowat LLC"}'
runat="client" style="color:darkcyan">
<p id="item1client_name"></p>
<p id="item1client_company"></p>
<script>
item1client_name.textContent= `${item1client.data.name} ${item1client.data.lastName}`;
item1client_company.textContent=`${item1client.data.company}`
</script>
</database-64>
Markup
<h3>runat="server"</h3>
<database-64 id="item1server" data-name="data" content-type="json"
source="/api_json_test"
runat="server" style="color:cornflowerblue">
<p id="item1server_name"></p>
<p id="item1server_company"></p>
<script>
item1server.data.then(item => {
document.getElementById("item1server_name").textContent = `${item.name} ${item.lastName}`;
document.getElementById("item1server_company").textContent = item.company;
});
</script>
</database-64>
Markup
<database-64 id="item2client" data-name="data" content-type="json64"
source="eyJuYW1lIjoiTWVsdmluIiwibGFzdE5hbWUiOiJIZXJuYW5kZXoiLCJjb21wYW55IjoiQXJyb3dhdCBMTEMifQ"
runat="client">
<p id="item2client_name"></p>
<p id="item2client_company"></p>
<script>
item2client_name.textContent= `${item2client.data.name} ${item2client.data.lastName}`;
item2client_company.textContent=`${item2client.data.company}`
var elementitems = document.getElementById("item2client");
elementitems.style.color="purple";
</script>
</database-64>
Markup
<database-64 id="item2server" data-name="data" content-type="json64"
source="/api_json64_test"
runat="server" style="color:orangered">
<p id="item2server_name"></p>
<p id="item2server_company"></p>
<script>
item2server.data.then(data => {
document.getElementById("item2server_name").textContent = `${data.name} ${data.lastName}`;
document.getElementById("item2server_company").textContent = data.company;
});
</script>
</database-64>
Markup
<database-64 content-type="image64" alt="image64" style="height:200px;border-radius:8px"
source="imageinbase64"
runat="client">
</database-64>
Markup
<database-64 content-type="image64" alt="image64" style="height:200px;border-radius:8px"
source="/Api_image64_test"
runat="server">
</database-64>
Markup
<database-64 content-type="frame" title="this frame is running content from server" style="height:600px;width:400px; border-radius:8px; border:2px red solid"
source="https://sa17745.satelliteintent.com/capsule?open=U3VuZGF5LCBOb3ZlbWJlciAwMiwgMjAyNSBhdCAxMjo1NyBQTQ0KDQpBdXRob3I6IE1lbHZpbiBIZXJuYW5kZXoNClNpZ25hbCBJZGVudGl0eTogbWVsdmluLmFycm93YXQuaWQNClBsYXRmb3JtOiBBcnJvd2F0DQpBcnJvd2F0IFByb2ZpbGU6IGh0dHBzOi8vYXJyb3dhdC5jb20vbWVsdmluDQoNCk91ciBjcm9zcy1wbGF0Zm9ybSBhcHBzIGRldmVsb3BlZCBhdCBBcnJvd2F0IExMQyBDb21wYW55IA0KDQpXZSBoYXZlIGRldmVsb3BlZCBhcHBzIHRhaWxvcmVkIGZvciBib3RoIGJ1c2luZXNzIGFuZCBpbmRpdmlkdWFsIG5lZWRzOg0KDQrwn5S0IEFycm93YXQgRW5jcnlwdG9yDQoNCvCflLQgQXJyb3dhdCBQT1MgU3lzdGVtDQoNCvCflLQgQXJyb3dhdCBMYWJlbCBDcmVhdG9yDQoNCvCflLQgQXJyb3dhdCBXb3JrZm9yY2UNCg0K8J-UtCBKYXZhU2NyaXB0IFN0dWRpbw0KDQrwn5S1IFN1YlBsYXllcg0KDQrwn5S1IFN5c3RlbSBTcGVlY2gNCg0K8J-UtSBTY2hvb2wgWm9uZQ0KDQrwn5S1IFNob3J0IExpbmsgQ3JlYXRvcg0KDQrwn5S1IFZpcnR1YWwgTGFuZ3VhZ2UNCg0KQXZhaWxhYmxlIGZvciBXaW5kb3dzIDExLCBBbmRyb2lkLCBpUGhvbmUsIGlPUw0KDQpMZWFybiBtb3JlIGFib3V0IG91ciBhcHBzIGF0IA0K8J-UlyBhcHBzLmFycm93YXRsbGMuY29tDQoNCk9yaWdpbmFsIFBvc3QgYXQ6IGFycm93YXQuY29tL21lbHZpbi9wb3N0L3NhOVFqaXFmcjk3dWRrQmZHTXFmUnhsU3FiTVRPUGpPRmpveFZGcGRjektKekdYWVNQRlNNSVp2WEsxVUlTNDU3NjQyMTkyMjAwMDg1ODc3ODFSc3hLdWF6Y1NJSUpiV0pVb2hQNExYa0xOVmpDbDV5ZUxiVjRPSlRBWGx2RnkwZHl6ZjFmU0IySGVmYnIzUWMzYTE3ZjE0ODVhNzQ2ZjNiZWQ3MDFmODUxOTE4MjJk"
runat="server">
</database-64>
Markup
<database-64 content-type="frame" title="This frame is running content from client" class='backgound-color-orangered' style="border-radius:8px;border:2px black solid"
source="<style>.color-white{color:white}</style><p class='color-white' style='text-decoration:overline'><strong>Name:</strong> Melvin Hernandez</p><p><strong>Company:</strong> Arrowat LLC</p>"
runat="client">
</database-64>
Markup
<p id="plaintextclient" style="color:red"></p>
<script>
var database64PlainText = new Database64.Source("This i a plain text from client","plaintext","client");
async function showPlainText() {
const text = await database64PlainText.Open();
plaintextclient.innerText = `${text}`;
}
showPlainText();
</script>
Markup
<p id="plaintextserver" style="color:darkviolet"></p>
<script>
var database64PlainText = new Database64.Source("/api_plain_text_test","plaintext","server");
async function showPlainText() {
const text = await database64PlainText.Open();
plaintextserver.innerText = `${text}`;
}
showPlainText();
</script>
Markup
<div id="htmlclient" style="color:fuchsia;"></div>
<script>
var htmlclientsource = new Database64.Source("<p style='font-weight:bolder;color:green'>Read about the cognitive web at <a href='https://thecognitiveweb.com' target='_blank' style='font-weight:normal;text-decoration:underline'>thecognitiveweb.com</a></p>","html","client");
async function showhtmlclient() {
const html = await htmlclientsource.Open();
htmlclient.innerHTML = `${html}`;
}
showhtmlclient();
</script>
Markup
<div id="htmlserver" style="color:dodgerblue"></div>
<script>
var htmlserversource = new Database64.Source("/Articles/The-cognitive-web","html","server");
async function showhtmlserver() {
const html = await htmlserversource.Open();
htmlserver.innerHTML = `${html}`;
}
showhtmlserver();
</script>
Markup
<p id="showbase64fromclient" style="color:limegreen"></p>
<script>
var database64 = new Database64.Source("SGVsbG8gSSdtIGRhdGFiYXNlLWxlc3MgY29udGVudA==","base64","client");
async function showBase64() {
const text = await database64.Open();
showbase64fromclient.innerText = `${text}`;
}
showBase64();
</script>
<p id="showbase64fromserver" style="color:dodgerblue"></p>
<script>
var database64 = new Database64.Source("/api_base64_test","base64","server");
async function showBase64() {
const text = await database64.Open();
showbase64fromserver.innerText = `${text}`;
}
showBase64();
</script>
Markup
<pre id="productinfoclientJSON" style="color:blue"></pre>
<script>
var productinfo={product:{details:{ name : "Arrowat Encryptor",
description : "Arrowat Encryptor provides the way to save the encrypted content to file with a separated encrypted key that is used to decrypt the content",
developer : "Arrowat LLC",
more:{price:"FREE",
releasedate:"12/7/2021",
platforms:"Android, iOS, Windows",
downloadat:"https://apps.arrowatllc.com/arrowatencryptor"
}}}};
var database64JSON = new Database64.Source(productinfo,"json","client");
async function showDataJSON() {
const data = await database64JSON.Open();
productinfoclientJSON.innerHTML = `
Product Name: ${data.product.details.name}
Description: ${data.product.details.description}
Developer: ${data.product.details.developer}
Price: ${data.product.details.more.price}
Release Date: ${data.product.details.more.releasedate}
Platforms: ${data.product.details.more.platforms}
Website: <a href='${data.product.details.more.downloadat}' target'_blank'>${data.product.details.more.downloadat}</a>`;
}
showDataJSON();
</script>
Markup
<pre id="productinfoserverJSON" style="color:blue">
</pre>
<script>
var database64JSON = new Database64.Source("/api_productinfo_json_test","json","server");
async function showDataJSON() {
const data = await database64JSON.Open();
productinfoserverJSON.innerHTML = `
Product Name: ${data.product.details.name}
Description: ${data.product.details.description}
Developer: ${data.product.details.developer}
Price: ${data.product.details.more.price}
Release Date: ${data.product.details.more.releasedate}
Platforms: ${data.product.details.more.platforms}
Website: <a href='${data.product.details.more.downloadat}' target = '_blank'>${data.product.details.more.downloadat}</a>`;
}
showDataJSON();
</script>
Markup
<pre id="personinfojson64" style="color:red"></pre>
<script>
var database64JSON = new Database64.Source("eyJuYW1lIjoiTWVsdmluIiwibGFzdE5hbWUiOiJIZXJuYW5kZXoiLCJjb21wYW55IjoiQXJyb3dhdCBMTEMifQ","json64","client");
async function showDataJSON() {
const data =await database64JSON.Open();
personinfojson64.innerText = `
Name: ${data.name}
Last Name: ${data.lastName}
Company:${data.company}`;
}
showDataJSON();
</script>
Markup
<pre id="personinfoserverjson64" style="color:blue"></pre>
<script>
var database64JSON = new Database64.Source("/api_json64_test","json64","server");
async function showDataJSON() {
const data =await database64JSON.Open();
personinfoserverjson64.innerText = `
Name: ${data.name}
Last Name: ${data.lastName}
Company: ${data.company}`;
}
showDataJSON();
</script>
Markup
<img id="displayimage64" style="height:200px;border:pink 5px solid" alt="" />
<script>
var dataImage64 = new Database64.Source("imageinbase64","image64","client");
async function showImage64() {
const image64 = await dataImage64.Open();
displayimage64.src = `${image64}`;
}
showImage64();
</script>
Markup
<img id="displayserverimage64" style="height:200px;border:pink 5px solid" alt="" />
<script>
var dataImage64 = new Database64.Source("/Api_image64_test","image64","server");
async function showImage64() {
const image64 = await dataImage64.Open();
displayserverimage64.src = `${image64}`;
}
showImage64();
</script>