Lab

Browser APIs Playground

Hands-on demos of modern web platform APIs: crypto, encoding, Intl, media queries, observers, and more, all running client-side.

← Back to sandbox overview Contact

Pick an API tab, run the live demo, and inspect real browser output. Every panel uses native APIs with no backend.

Secure context

SubtleCrypto digest

Hash text with the Web Crypto API (SHA-256, SHA-384, or SHA-512) and measure work with performance.now().

Client-side hashing supports integrity checks, content addressing, and secure random workflows without sending raw input to a server.

MDN documentation

API snippet
const bytes = new TextEncoder().encode(text);
const digest = await crypto.subtle.digest('{algo}', bytes);
const hex = [...new Uint8Array(digest)]
  .map((b) => b.toString(16).padStart(2, '0'))
  .join('');

Elapsed: n/a

Digest visualization (Canvas)