<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: armor229-ux</title>
    <description>The latest articles on DEV Community by armor229-ux (@armor229ux).</description>
    <link>https://dev.to/armor229ux</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3999038%2Fe69fe053-25cd-4613-bfb3-e1e1f240c922.jpg</url>
      <title>DEV Community: armor229-ux</title>
      <link>https://dev.to/armor229ux</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/armor229ux"/>
    <language>en</language>
    <item>
      <title>How I Built a Privacy-First PDF Toolkit That Runs Entirely in the Browser</title>
      <dc:creator>armor229-ux</dc:creator>
      <pubDate>Tue, 23 Jun 2026 20:23:30 +0000</pubDate>
      <link>https://dev.to/armor229ux/how-i-built-a-privacy-first-pdf-toolkit-that-runs-entirely-in-the-browser-2n8i</link>
      <guid>https://dev.to/armor229ux/how-i-built-a-privacy-first-pdf-toolkit-that-runs-entirely-in-the-browser-2n8i</guid>
      <description>&lt;p&gt;Most "free" PDF tools online have a dirty secret: they upload your files to their servers. Some keep them. Some scan them. Some sell the data.&lt;/p&gt;

&lt;p&gt;I wanted to build something different — a PDF toolkit where files &lt;strong&gt;never leave the user's browser&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The result is &lt;a href="https://file-flex-psi.vercel.app" rel="noopener noreferrer"&gt;FileFlex&lt;/a&gt; — a free, browser-based file toolkit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Existing Tools
&lt;/h2&gt;

&lt;p&gt;Open any popular online PDF tool and watch the Network tab in DevTools. You'll see your file getting uploaded to their servers within seconds. Then you wait. Then you download.&lt;/p&gt;

&lt;p&gt;Why? Two reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They use server-side libraries (faster, but requires upload)&lt;/li&gt;
&lt;li&gt;They want to track your usage and show you ads&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I wanted to flip this model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js 14&lt;/strong&gt; (App Router)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript&lt;/strong&gt; for type safety&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt; for styling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pdf-lib&lt;/strong&gt; for PDF operations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;browser-image-compression&lt;/strong&gt; for images&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Crypto API&lt;/strong&gt; for password protection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vercel&lt;/strong&gt; for hosting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Magic: Browser-Based PDF Merge
&lt;/h2&gt;

&lt;p&gt;The hardest part was getting PDF merge to work without a backend. Here's the core logic:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\&lt;/code&gt;`javascript&lt;br&gt;
import { PDFDocument } from 'pdf-lib';&lt;/p&gt;

&lt;p&gt;async function mergePDFs(files) {&lt;br&gt;
  const mergedPdf = await PDFDocument.create();&lt;/p&gt;

&lt;p&gt;for (const file of files) {&lt;br&gt;
    const pdfBytes = await file.arrayBuffer();&lt;br&gt;
    const pdf = await PDFDocument.load(pdfBytes);&lt;br&gt;
    const pages = await mergedPdf.copyPages(&lt;br&gt;
      pdf, &lt;br&gt;
      pdf.getPageIndices()&lt;br&gt;
    );&lt;br&gt;
    pages.forEach((page) =&amp;gt; mergedPdf.addPage(page));&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;const mergedBytes = await mergedPdf.save();&lt;br&gt;
  return new Blob([mergedBytes], { type: 'application/pdf' });&lt;br&gt;
}&lt;br&gt;
`&lt;code&gt;\&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's it. No server. No upload. Just JavaScript in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  What FileFlex Does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Merge PDFs&lt;/li&gt;
&lt;li&gt;✅ Compress PDFs (up to 80% smaller)&lt;/li&gt;
&lt;li&gt;✅ Password-protect PDFs&lt;/li&gt;
&lt;li&gt;✅ Compress images (JPEG/PNG/WebP)&lt;/li&gt;
&lt;li&gt;✅ Generate strong passwords&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Approach Wins
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Privacy&lt;/strong&gt;: Your files never leave your device&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt;: No upload/download wait&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No limits&lt;/strong&gt;: No file size restrictions (browser memory aside)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free forever&lt;/strong&gt;: No server costs = no need to charge&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;Live demo: &lt;a href="https://file-flex-psi.vercel.app" rel="noopener noreferrer"&gt;https://file-flex-psi.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's free, no signup required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Browser APIs are surprisingly powerful&lt;/strong&gt; — you can do way more than you'd think without a backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy is a feature&lt;/strong&gt; — users genuinely care&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removing signup walls boosts usage&lt;/strong&gt; — friction kills conversion&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Split PDF feature&lt;/li&gt;
&lt;li&gt;PDF to JPG conversion&lt;/li&gt;
&lt;li&gt;HEIC to JPG converter&lt;/li&gt;
&lt;li&gt;More languages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What other browser-only tools would you want? Let me know in the comments! 👇&lt;/p&gt;




&lt;p&gt;If you liked this, follow me for more web dev posts. The full source approach is documented on the &lt;a href="https://file-flex-psi.vercel.app/blog" rel="noopener noreferrer"&gt;blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>typescript</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
