How it works: browser-native processing
Every Peasy tool runs entirely in your browser. Here's a detailed look at the Web APIs and libraries that make it possible.
The architecture
When you open a Peasy tool, your browser downloads a small HTML page, some CSS, and a JavaScript engine specific to that tool category. When you select a file or enter text, everything happens locally:
No network request is made during steps 2-4. Your data stays in browser memory the entire time.
Image Processing
Image tools use the Canvas API and OffscreenCanvas for pixel manipulation. When you resize, crop, rotate, or apply filters to an image, the browser creates a 2D rendering context, draws your image onto it, applies transformations, and exports the result as a new file.
Format conversion (PNG → WebP, JPEG → AVIF) leverages the browser's built-in image codecs via canvas.toBlob(). Quality control is handled through the codec's quality parameter. For metadata operations (EXIF stripping, viewing), we parse the binary JPEG/TIFF headers directly in JavaScript using DataView and ArrayBuffer.
PDF Processing
PDF tools are powered by pdf-lib, a pure JavaScript library that can create and modify PDF documents without any server. It parses the PDF's internal structure (cross-reference tables, object streams, content streams) and manipulates them directly.
Merging PDFs means copying page objects between documents. Splitting means creating new documents with subsets of pages. Compression uses pako (a JavaScript zlib implementation) to deflate content streams. Text extraction walks the PDF's content stream operators to reconstruct character sequences — all happening in your browser's JavaScript engine.
Video & Audio Processing
Video and audio tools use FFmpeg.wasm — a complete build of FFmpeg compiled to WebAssembly. This is the same FFmpeg that powers VLC, OBS, and most video software, but running inside your browser tab.
WebAssembly (Wasm) lets browsers execute compiled code at near-native speed. FFmpeg.wasm uses a virtual filesystem (FS) to read input files and write output files, all in memory. Format conversion, trimming, GIF creation, audio extraction — these are real FFmpeg operations running locally.
For lighter audio tasks (waveform visualization, duration analysis), we use the Web Audio API and its AudioContext, which provides hardware-accelerated audio decoding and DSP capabilities built into every modern browser.
Developer & Text Processing
Developer tools (JSON formatter, Base64 encoder, regex tester, diff viewer) and text tools (word counter, case converter, markdown preview) run on pure JavaScript string and DOM manipulation. No external libraries needed — the browser's built-in JSON.parse(), btoa()/atob(), RegExp, and TextEncoder/TextDecoder handle everything.
For more complex operations like syntax highlighting, we use lightweight parsers. UUID generation uses crypto.getRandomValues() for cryptographically secure randomness. URL encoding/decoding uses the standard encodeURIComponent() and decodeURIComponent() built into every browser.
CSS & Design Tools
CSS tools use the browser's own CSS engine for validation and preview. Gradient generators manipulate CSS linear-gradient() and radial-gradient() functions. Color pickers use the Canvas API to render color spaces and the getComputedStyle() API to resolve CSS color values.
Shadow generators, border-radius visualizers, and flexbox/grid playgrounds create live CSS and apply it to DOM elements in real-time. The browser is literally rendering your design as you tweak the parameters — what you see is exactly what the CSS produces.
Security & Cryptography
Security tools use the Web Crypto API (window.crypto.subtle), which provides hardware-accelerated cryptographic operations. SHA-256, SHA-512, and HMAC hashing use the browser's native implementation — the same one that secures your HTTPS connections.
Password generation uses crypto.getRandomValues(), which draws from the operating system's cryptographic random number generator (CSPRNG). AES encryption and decryption happen through subtle.encrypt() and subtle.decrypt(). These are not JavaScript reimplementations — they're the real thing, running in the browser's native crypto module.
QR & Barcode
QR code generation uses Reed-Solomon error correction encoding implemented in JavaScript, then renders the matrix to Canvas or SVG. Barcode generation follows the specifications for EAN-13, UPC-A, Code 128, and other symbologies — each with its own encoding algorithm.
For scanning, the BarcodeDetector API (available in Chromium browsers) provides native barcode recognition. On other browsers, we fall back to JavaScript-based detection using the camera feed from getUserMedia().
SEO, Math, Social & Generator Tools
These tool categories rely primarily on JavaScript string processing, DOM manipulation, and the Clipboard API. SEO tools parse HTML meta tags and count characters. Math tools evaluate expressions using JavaScript's Math object and custom parsers. Social media tools generate preview cards by rendering HTML/CSS.
Generator tools (Lorem Ipsum, UUID, color palettes) use crypto.getRandomValues() for secure randomness where needed, or deterministic algorithms for reproducible outputs. All computation is instant because it's pure JavaScript — no network calls, no API rate limits.
Browser compatibility
Peasy tools work in all modern browsers: Chrome, Firefox, Safari, Edge, and their mobile counterparts. Most tools require no special browser features beyond standard ES2020+ JavaScript. Video tools require WebAssembly support (available in all browsers since 2017). Some advanced features (like the BarcodeDetector API) have progressive fallbacks for browsers that don't support them yet.