Skip to main content
Technical Reference & Best Practices

Engineering Guides & Documentation

Deep-dive architectural notes on client-side privacy, data encoding standards, cryptographic randomness, and media optimization for modern web workflows.

Security & Privacy5 min read

Client-Side Privacy Architecture: Why Browser-Local Processing Beats Cloud Utilities

Most legacy online formatters, hash generators, and image compressors upload your payload to a remote backend before returning a result. Learn how modern Web APIs eliminate server roundtrips entirely.

The Hidden Risk of Server-Backed Utility Sites

When a developer pastes an API response, JWT payload, or configuration file into a traditional web formatter, an HTTP POST request often transmits that payload through CDNs, reverse proxies, and application logs. Even well-intentioned services can inadvertently retain sensitive tokens in crash dumps or access logs.

How ToolsCabinet Executes 100% in Memory

Every tool in ToolsCabinet runs strictly inside the browser JavaScript engine and Web APIs (FileReader, HTML5 Canvas, SubtleCrypto, and Intl). Network tab inspection during any operation confirms zero XHR or Fetch requests carrying user data. When you close or reset a tab, garbage collection and explicit URL.revokeObjectURL() calls release all local buffers.

Developer Standards6 min read

RFC 8259 JSON Validation & Solving the UTF-8 Base64 "Latin1 Problem" in Browsers

Why native window.btoa() throws InvalidCharacterError on multi-byte Unicode strings, and how TextEncoder/TextDecoder pipelines guarantee lossless UTF-8 Base64 encoding.

Strict RFC 8259 JSON Parsing vs. JavaScript Object Literals

A frequent source of webhook and REST API failures is confusing relaxed JavaScript object syntax with strict RFC 8259 JSON. Trailing commas after the last property, single-quoted keys, unescaped control characters (U+0000 through U+001F), and NaN/Infinity literals are all rejected by compliant JSON parsers. Our JSON Formatter and JSON Validator pinpoint exact line and column offsets so you can fix malformed payloads rapidly.

UTF-8 Safe Base64 Encoding with TextEncoder

The legacy DOM window.btoa() function only accepts characters in the 0x00–0xFF Latin1 range, crashing whenever emojis or accented characters appear. ToolsCabinet converts strings to a UTF-8 Uint8Array via TextEncoder before Base64 serialization, and reconstructs multi-byte code points cleanly via TextDecoder on decode.

Cryptography4 min read

Cryptographic Entropy: How Web Crypto CSPRNG Outperforms Math.random()

Understanding Shannon entropy bits, character pool sizes, and why cryptographic randomness via window.crypto.getRandomValues() is mandatory for credentials and UUID v4.

Why Math.random() Must Never Generate Passwords

Standard Math.random() implementations use pseudo-random algorithms (such as xorshift128+) seeded from predictable internal state. They are fast for simulations or UI animations, but unsuitable for security credentials. ToolsCabinet uses window.crypto.getRandomValues() backed by the operating system entropy pool.

Calculating Password Entropy (E = L × log₂(R))

Password strength is measured in bits of entropy: Length (L) multiplied by the base-2 logarithm of the character pool size (R). A 16-character password drawn from uppercase, lowercase, digits, and symbols (R ≈ 90) yields roughly 103.9 bits of entropy—well above the 80-bit threshold recommended against offline GPU brute-force attacks.

Web Performance5 min read

Browser Canvas & WebP Image Optimization for Core Web Vitals (LCP)

How resizing, cropping, and transcoding PNG/JPEG assets to modern WebP directly in the browser improves Largest Contentful Paint without uploading proprietary design assets.

Right-Sizing Dimensions Before Compression

Serving a 3840×2160 screenshot inside a 720px article column wastes megabytes of bandwidth regardless of compression format. Resizing pixel dimensions first yields the largest byte reduction, followed by lossy quality tuning between 75% and 85%.

When to Use WebP, JPEG, PNG, or Base64 Data URIs

WebP offers 25–35% smaller file sizes than JPEG at equivalent perceptual quality while preserving alpha transparency. Inline Base64 Data URIs eliminate extra HTTP requests for tiny icons (< 4 KB), whereas larger hero images should remain binary WebP or JPEG files so the browser can stream and cache them independently.