API / dg-encoder

DG Encoder

A free, no-API-key service powered by Cloudflare Workers that lets developers store and retrieve text-based data — webhooks, secrets, config — through simple endpoints.

WHY Why it exists

Developers often need to store webhook URLs, service endpoints, and configuration strings without exposing them directly in frontend code. Most solutions mean spinning up a backend, paying for a service, or juggling API keys. DG Encoder skips all of that — store a value, get an ID back, and keep the real value out of your codebase entirely.

DO What it does

$00 Free forever

There's no signup requirement, no subscription, and no paid plan blocking core functionality. Open the website, encode your value, and start using it.

LIM Limits

100,000
requests / day
18 / min
rate limit
30
max encodings per user
8,000
max value size (chars)
200
max label size (chars)
7 days
min. age before deletion
Supports English letters, numbers, and symbols like #, @, and $. Emojis and other languages aren't supported. Encodings can only be deleted once they're at least 7 days old.

EPT Endpoints

MethodEndpointPurpose
GET/Web UI
POST/encodeCreate a new encoding
GET/d/:idDecode a stored value
GET/r/:idRedirect to a stored URL
GET/mineList your encodings
PATCH/d/:idUpdate allowed domains
DELETE/d/:idDelete an encoding

WIR Wiring it up

Encode + decode (not recommended)

You can encode directly from code, but then your original secret still passes through your own script once. It's better to encode from the website itself:

// Store a webhook URL once. It's recommended to encode from the
// website instead — otherwise your original URL appears in your code.
const create = await fetch(
  "https://dg-encoder.scriptsnsenses.workers.dev/encode",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      value: "https://hooks.example.com/my-secret-webhook",
      label: "Orders Webhook",
      domains: ["myapp.com"]
    })
  }
);

const encoded = await create.json();

// Later, retrieve it
const decoded = await fetch(encoded.decodeUrl);
const webhook = await decoded.json();

// Use the real URL
await fetch(webhook.value, {
  method: "POST",
  body: JSON.stringify({ event: "order.created" })
});

Decode only — recommended path

Encode once through the website, then your code only ever needs the ID:

const id = "YOUR_ENCODING_ID";

const res = await fetch(
  `https://dg-encoder.scriptsnsenses.workers.dev/d/${id}`
);

const data = await res.json();
console.log(data.value);

Redirect to a stored URL

const id = "YOUR_ENCODING_ID";

window.location.href =
  `https://dg-encoder.scriptsnsenses.workers.dev/r/${id}`;

List your encodings

const userKey = localStorage.getItem("dgUserKey");

const res = await fetch(
  "https://dg-encoder.scriptsnsenses.workers.dev/mine",
  { headers: { "X-User-Key": userKey } }
);

const data = await res.json();
console.log(data.encodings);

Update allowed domains

const userKey = localStorage.getItem("dgUserKey");
const id = "YOUR_ENCODING_ID";

await fetch(
  `https://dg-encoder.scriptsnsenses.workers.dev/d/${id}`,
  {
    method: "PATCH",
    headers: {
      "Content-Type": "application/json",
      "X-User-Key": userKey
    },
    body: JSON.stringify({
      domains: ["myapp.com", "dashboard.myapp.com"]
    })
  }
);

Delete an encoding

const userKey = localStorage.getItem("dgUserKey");
const id = "YOUR_ENCODING_ID";

await fetch(
  `https://dg-encoder.scriptsnsenses.workers.dev/d/${id}`,
  {
    method: "DELETE",
    headers: { "X-User-Key": userKey }
  }
);

USE Example use cases

SYS Tech stack

Cloudflare Workers Cloudflare KV JavaScript Edge Computing

NXT Future plans

Features being considered for future releases:

Security note: DG Encoder auto-encodes differently every time it stores data — so even DG can't see your secrets once they're in. It's built as a lightweight utility, not a replacement for enterprise secret-management platforms, and works best for webhooks, config values, dynamic URLs, and small-to-medium web projects.