Pasting a production JWT, a customer's JSON payload or a signed contract into a random website is a habit most of us have and few of us like. The good news is that most everyday developer utilities don't need a server at all. The browser already ships the pieces.
I run ToolkitHub, a set of 92 free tools (PDF, image, JSON, JWT, encoders, formatters, converters). Almost all of them run entirely in the tab. Here is how a few of them work, and the two that can't.
Verifying a JWT with Web Crypto
Decoding a JWT is just Base64URL. Verifying the signature sounds like server work, but the Web Crypto API does it natively:
const b64url = (s) => Uint8Array.from(atob(s.replace(/-/g, '+').replace(/_/g, '/')), (c) => c.charCodeAt(0)); async function verifyHS256(token, secret) { const [header, payload, signature] = token.split('.'); const key = await crypto.subtle.importKey( 'raw', new TextEncoder().encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['verify'] ); return crypto.subtle.verify( 'HMAC', key, b64url(signature), new TextEncoder().encode(`${header}.${payload}`) ); } crypto.subtle.verify compares the signature for you, and the same API handles RS256 and ES256 with an imported public key (spki PEM or JWK). The token and the secret never leave the page.
Merging PDFs without uploading them
A PDF is a set of numbered objects: pages, content streams, fonts, images. Merging means copying page objects from several documents into a new one. pdf-lib does this in the browser:
import { PDFDocument } from 'pdf-lib'; async function mergePdfs(files) { // files: ArrayBuffer[] from <input type="file"> const out = await PDFDocument.create(); for (const bytes of files) { const src = await PDFDocument.load(bytes); const pages = await out.copyPages(src, src.getPageIndices()); pages.forEach((page) => out.addPage(page)); } return out.save(); // Uint8Array, ready for a Blob download } Because pages are copied, not re-rendered, text stays selectable and the output is about the size of the inputs combined. Splitting, rotating, reordering, page numbers and metadata editing all work the same way. For previews and PDF-to-image, pdf.js renders pages to a canvas.
Compressing images with a canvas
Image compression in the browser is: decode the file, draw it on a canvas, encode it again at a lower quality.
async function compress(file, quality = 0.75, type = 'image/webp') { const bitmap = await createImageBitmap(file); const canvas = document.createElement('canvas'); canvas.width = bitmap.width; canvas.height = bitmap.height; canvas.getContext('2d').drawImage(bitmap, 0, 0); return new Promise((resolve) => canvas.toBlob(resolve, type, quality)); } Resizing is the same with a smaller canvas. One side effect worth knowing: re-encoding through a canvas drops EXIF metadata, including GPS location, which is usually what you want before sharing a photo.
Counting LLM tokens
Token counters often call an API. They don't need to: the BPE encodings that OpenAI models use (o200k_base for GPT-4o, cl100k_base for GPT-4) are available as JavaScript libraries, so the text is tokenized locally and you see the exact count before you send a prompt.
The two that can't be local
Some tools need the network by definition:
- DNS lookup sends the domain name to a DNS-over-HTTPS resolver (Cloudflare's
cloudflare-dns.com). - IP lookup asks a geolocation service about your public IP.
Both pages say so up front. That's the rule I'd suggest for any tool site: if something leaves the browser, tell the user before it happens.
Making a client-side app indexable
A tool site built as a single-page app has an SEO problem: crawlers see an empty <div id="root">. ToolkitHub prerenders every route at build time with React's renderToString, so each URL ships real HTML with its own title, description, canonical link and written guide. The interactive tool then mounts in the browser. Each tool is lazy-loaded, so opening the JSON formatter doesn't download the PDF engine.
Try it
Everything above is live at toolkithub.in: the JWT verifier, PDF merger, image compressor and token counter among them. No sign-up, and what you paste stays on your machine.
Disclosure: I built and run ToolkitHub. The tools are free to use.
