
Building a JSON Formatter: Zero-Click Auto-Format and the Clipboard API Trap
When an API response comes back as a single line, what do you reach for? Open jsonformatter.org, paste, click "Format." Three steps I was repeating dozens of times a week. Then in November 2025, watchTowr Labs revealed that jsonformatter.org and codebeautify.org had leaked over 80,000 AWS keys and API secrets -- because every piece of JSON you paste gets sent to their servers. The act of formatting JSON online was itself a security risk. So I built a tool where you copy JSON, open a tab, and it's already formatted. Zero server transmission. Try it now -- copy any JSON to your clipboard and open this link: https://json.puremark.app This article documents the traps I hit along the way: Clipboard API quirks, syntax highlighting without external libraries, and Tailwind's purge problem with innerHTML. If you're building browser-based developer tools, this might save you some debugging hours. Tech Stack React 19 + TypeScript + Vite 6 + Tailwind CSS v4 + vite-plugin-pwa A simple SPA -- no sta
Continue reading on Dev.to Webdev
Opens in a new tab




