Blog

Small tools that never leave the tab

· tools · javascript

Search for "base64 decode" and you'll find a hundred websites happy to do it for you — on their servers, wrapped in ads, with your input in their request logs. For text that's often a credential, a token, or a chunk of somebody's config file, that's a strange default. Browsers have been able to do all of this locally for a decade.

So the Tools section of this site has one rule: nothing you type leaves the tab.

The rules

  • One page per tool. All of the tool's logic is inline in its own HTML file. No shared "tool framework" that grows into a dependency.
  • No network calls. The page loads fonts and a stylesheet; the tool itself makes zero requests. You can watch the network panel while you use it.
  • It fails alone. If the site's shared script breaks, the tool keeps working — the shell (header, theme toggle) is decoration, not a dependency.

Base64, the deceptively simple first tool

The first tool is a Base64 encoder/decoder, which sounds like a one-liner because everyone half-remembers btoa(). But btoa() operates on Latin-1 strings, so the one-liner throws the moment someone pastes an emoji or any non-ASCII text. The correct shape is to encode text to UTF-8 bytes first:

var bytes = new TextEncoder().encode(str);
var bin = '';
for (var i = 0; i < bytes.length; i++) {
  bin += String.fromCharCode(bytes[i]);
}
var out = btoa(bin);

…and decode in reverse with TextDecoder. The tool also handles the URL-safe alphabet (-_ instead of +/, padding stripped), because half the Base64 in the wild — JWTs, URL parameters — is the URL-safe flavor, and pasting it into a strict decoder is a classic small annoyance.

What's next

A subnet calculator is sketched out (CIDR math is exactly the kind of thing I re-derive on paper every time), and the directory has room for whatever small utility I catch myself opening someone else's server-side website for. The bar for adding one is low on purpose: if it saves future-me thirty seconds a month, it earns a page.