<?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: Sourav Mahapatra</title>
    <description>The latest articles on DEV Community by Sourav Mahapatra (@srvmhptr).</description>
    <link>https://dev.to/srvmhptr</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%2F3808575%2F1b6e4b36-6d43-4456-86e2-a80f573e6871.png</url>
      <title>DEV Community: Sourav Mahapatra</title>
      <link>https://dev.to/srvmhptr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/srvmhptr"/>
    <language>en</language>
    <item>
      <title>Compress a photo to an exact KB limit in the browser (and why "under 20 KB" isn't the only rule)</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Sat, 14 Nov 2026 09:46:58 +0000</pubDate>
      <link>https://dev.to/srvmhptr/compress-a-photo-to-an-exact-kb-limit-in-the-browser-and-why-under-20-kb-isnt-the-only-rule-1lei</link>
      <guid>https://dev.to/srvmhptr/compress-a-photo-to-an-exact-kb-limit-in-the-browser-and-why-under-20-kb-isnt-the-only-rule-1lei</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: this post was drafted with AI assistance and checked against working code. I build BeginThings, the free tool mentioned near the end.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Anyone who has filled an Indian government or bank job form knows the upload box that says something like &lt;strong&gt;"Photograph: 20 KB to 50 KB, JPG only"&lt;/strong&gt; and &lt;strong&gt;"Signature: 10 KB to 20 KB"&lt;/strong&gt;. A phone photo is 2 to 5 MB. You need to throw away about 99% of the file without making a face or a signature unreadable, and the form rejects you if you overshoot in either direction.&lt;/p&gt;

&lt;p&gt;If you're building an upload flow with a hard size limit, you have the same problem in code. Here's how to solve it entirely in the browser with &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt;, no server and no library.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why you can't just pick a quality
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;canvas.toBlob(cb, 'image/jpeg', q)&lt;/code&gt; takes a quality between 0 and 1, but quality isn't a file-size dial. The same &lt;code&gt;q&lt;/code&gt; gives a tiny file for a plain signature on white paper and a huge one for a detailed outdoor photo. The only reliable way to hit a size is to &lt;strong&gt;encode, measure, and adjust&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Two facts make that cheap:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;File size goes up (roughly) as quality goes up, so you can &lt;strong&gt;binary-search&lt;/strong&gt; quality.&lt;/li&gt;
&lt;li&gt;Size depends on &lt;strong&gt;pixel count&lt;/strong&gt; as well as quality, so when quality alone can't get there, you shrink the image.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The order matters. Lower quality first, and shrink pixels only as a last resort. A 140 × 60 signature at decent quality stays crisp; a big signature crushed only by quality turns into blocky JPEG mush.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: draw onto a white canvas
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;drawToCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'canvas'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'2d'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fillStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'#fff'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c1"&gt;// JPEG has no transparency&lt;/span&gt;
  &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fillRect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drawImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That white fill is easy to forget. Without it, transparent pixels in a PNG signature come out &lt;strong&gt;black&lt;/strong&gt;, and you get a black rectangle with a signature you can't see.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: wrap &lt;code&gt;toBlob&lt;/code&gt; in a promise
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;encodeJpeg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;quality&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toBlob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'image/jpeg'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;quality&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: search quality, then shrink if needed
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fitUnder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maxBytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;round&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;round&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;drawToCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;naturalWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;naturalHeight&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Best case: high quality already fits.&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;encodeJpeg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.95&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;maxBytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Otherwise binary-search between a usable floor and the top.&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;low&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;high&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.95&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;low&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;high&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;encodeJpeg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;maxBytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;low&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c1"&gt;// fits: try higher&lt;/span&gt;
      &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;high&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;                                     &lt;span class="c1"&gt;// too big: go lower&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;best&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;0.82&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// even quality 0.3 was too big: drop ~18% of width and height&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;       &lt;span class="c1"&gt;// couldn't fit (very rare for limits of 10 KB and up)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few choices worth explaining:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keep the best fit, not the last try.&lt;/strong&gt; The final step of a binary search can land on a "too big" value, so store every blob that fits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eight steps&lt;/strong&gt; narrows quality to well under 0.01. More steps cost a full encode each and buy nothing you can see.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A floor of 0.3.&lt;/strong&gt; Below that, JPEG artefacts get ugly fast. It's usually better to lose some pixels than to go lower.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0.82 per round&lt;/strong&gt; shrinks the pixel count by about a third each time, so even a 12-megapixel photo reaches a 20 KB budget in a handful of rounds.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: wire it to a file input
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'change'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fitUnder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// 20 KB&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Could not get under the limit.'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;kb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`${kb} KB, ${result.canvas.width} × ${result.canvas.height}px`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;href&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'photo-under-20kb.jpg'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Show the user the final size &lt;strong&gt;and&lt;/strong&gt; dimensions before they download. Forms check both.&lt;/p&gt;

&lt;h3&gt;
  
  
  The rules that trip people up
&lt;/h3&gt;

&lt;p&gt;Most "compress to X KB" code only handles the maximum. Real forms have more rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A minimum, too.&lt;/strong&gt; "10 KB to 20 KB" means a 6 KB file fails. Searching for the &lt;em&gt;highest&lt;/em&gt; quality that fits under the max naturally lands near the top of the range; if you still come in under the minimum, raise the target rather than padding the file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pixel dimensions.&lt;/strong&gt; SBI's guidelines, for example, prefer a 200 × 230 px photo and a 140 × 60 px signature. Crop and resize to those first, then compress. Fewer pixels leaves more bytes for detail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Format.&lt;/strong&gt; Output a real JPEG with a &lt;code&gt;.jpg&lt;/code&gt; name. Renaming a PNG to &lt;code&gt;.jpg&lt;/code&gt; doesn't convert it, and some portals check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crop before you compress.&lt;/strong&gt; Every pixel of table or wall in the frame costs bytes that should go to the face or the ink.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What canvas compression can't do
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It &lt;strong&gt;drops EXIF metadata&lt;/strong&gt;. That's usually good for privacy, but don't rely on it to keep the camera date.&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;re-encodes&lt;/strong&gt;, so feeding an already tiny JPEG back in at quality 0.95 can make it &lt;em&gt;bigger&lt;/em&gt;. Check the original size first and skip work if it already fits.&lt;/li&gt;
&lt;li&gt;It can't rescue a blurry or badly lit photo. Retake in daylight against a plain background.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Shortcut
&lt;/h3&gt;

&lt;p&gt;If you just need the file and not the code, I built a free page that does exactly this, preset to 20 KB with other targets from 10 KB to 500 KB. It runs in your browser, with no upload and no sign-up: &lt;a href="https://beginthings.com/free-tools/compress-image-to-20kb.html?utm_source=devto&amp;amp;utm_medium=community&amp;amp;utm_campaign=cm-exact-kb-compress" rel="noopener noreferrer"&gt;compress an image to 20 KB&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrap-up
&lt;/h3&gt;

&lt;p&gt;Hitting a byte budget is a search problem, not a formula: binary-search JPEG quality, keep the best fit, and shrink pixels only when quality alone can't get there. Then check the rules your form actually enforces: minimum size, dimensions and format, not just "under X KB".&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Readability scores explained: Flesch Reading Ease vs Flesch–Kincaid Grade (with the formulas and a worked example)</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Sun, 08 Nov 2026 09:47:55 +0000</pubDate>
      <link>https://dev.to/srvmhptr/readability-scores-explained-flesch-reading-ease-vs-flesch-kincaid-grade-with-the-formulas-and-a-gan</link>
      <guid>https://dev.to/srvmhptr/readability-scores-explained-flesch-reading-ease-vs-flesch-kincaid-grade-with-the-formulas-and-a-gan</guid>
      <description>&lt;p&gt;"Aim for a Flesch score of 60+." "Keep it at grade 8." You've probably heard both pieces of advice, sometimes in the same style guide, without anyone explaining where the numbers come from. They come from two formulas that are older than personal computers, use exactly the same inputs, and point in opposite directions.&lt;/p&gt;

&lt;p&gt;This post walks through both formulas, computes them by hand on two short texts, shows a minimal JavaScript implementation, and covers the edge cases that make different tools disagree.&lt;/p&gt;

&lt;h3&gt;
  
  
  The two formulas
&lt;/h3&gt;

&lt;p&gt;Both use just three counts from your text: &lt;strong&gt;words&lt;/strong&gt;, &lt;strong&gt;sentences&lt;/strong&gt; and &lt;strong&gt;syllables&lt;/strong&gt;. From those they derive two ratios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ASL&lt;/strong&gt;, average sentence length = words ÷ sentences&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ASW&lt;/strong&gt;, average syllables per word = syllables ÷ words&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Flesch Reading Ease (FRE)&lt;/strong&gt;, Rudolf Flesch, 1948:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FRE = 206.835 − 1.015 × ASL − 84.6 × ASW
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Higher is easier.&lt;/strong&gt; Long sentences and long words both pull the score down. Typical everyday prose lands somewhere between 50 and 80.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flesch–Kincaid Grade Level (FKGL)&lt;/strong&gt;, J. Peter Kincaid and colleagues, 1975, developed for the US Navy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FKGL = 0.39 × ASL + 11.8 × ASW − 15.59
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Higher is harder.&lt;/strong&gt; The result maps roughly to a US school grade: 8.0 means a typical eighth-grader (age 13–14) should follow it.&lt;/p&gt;

&lt;p&gt;Same inputs, different weights, opposite direction. That's why one guide says "go up" and another says "go down", and they're asking for the same thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Worked example 1: plain instructions
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Send the invoice today. Ask the client to pay within seven days. Keep a copy for your records.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Counts: &lt;strong&gt;18 words&lt;/strong&gt;, &lt;strong&gt;3 sentences&lt;/strong&gt;, &lt;strong&gt;24 syllables&lt;/strong&gt; (using a typical heuristic counter, more on that below).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ASL = 18 ÷ 3 = 6.0&lt;/li&gt;
&lt;li&gt;ASW = 24 ÷ 18 ≈ 1.333&lt;/li&gt;
&lt;li&gt;FRE = 206.835 − 1.015 × 6.0 − 84.6 × 1.333 ≈ &lt;strong&gt;87.9&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;FKGL = 0.39 × 6.0 + 11.8 × 1.333 − 15.59 ≈ &lt;strong&gt;2.5&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Very easy, roughly second-to-third-grade level. Exactly what you want for an instruction someone reads on their phone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Worked example 2: the same idea in legalese
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Remittance of the outstanding consideration should be effectuated within seven calendar days of receipt, notwithstanding any intervening administrative circumstances.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Counts: &lt;strong&gt;19 words&lt;/strong&gt;, &lt;strong&gt;1 sentence&lt;/strong&gt;, &lt;strong&gt;47 syllables&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ASL = 19 ÷ 1 = 19.0&lt;/li&gt;
&lt;li&gt;ASW = 47 ÷ 19 ≈ 2.474&lt;/li&gt;
&lt;li&gt;FRE = 206.835 − 19.285 − 209.27 ≈ &lt;strong&gt;−21.7&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;FKGL = 7.41 + 29.19 − 15.59 ≈ &lt;strong&gt;21.0&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yes, &lt;strong&gt;negative&lt;/strong&gt;. Flesch Reading Ease isn't capped at 0 to 100. That range is where most real text falls, but nothing in the formula enforces it. A grade of 21 means "beyond postgraduate". Both numbers are telling you the same thing: split the sentence and use shorter words.&lt;/p&gt;

&lt;h3&gt;
  
  
  A minimal implementation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;countSyllables&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;word&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[^&lt;/span&gt;&lt;span class="sr"&gt;a-z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;word&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;(?:[^&lt;/span&gt;&lt;span class="sr"&gt;laeiouy&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;es|ed|&lt;/span&gt;&lt;span class="se"&gt;[^&lt;/span&gt;&lt;span class="sr"&gt;laeiouy&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;e&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;$/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// silent endings&lt;/span&gt;
  &lt;span class="nx"&gt;word&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/^y/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;groups&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;aeiouy&lt;/span&gt;&lt;span class="se"&gt;]{1,2}&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;groups&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;readability&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sentences&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[^&lt;/span&gt;&lt;span class="sr"&gt;.!?&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;.!?&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+/g&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;words&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;+/&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Boolean&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;syllables&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;countSyllables&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;sentences&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;asl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;sentences&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;asw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;syllables&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;readingEase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;206.835&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;1.015&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;asl&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;84.6&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;asw&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;gradeLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.39&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;asl&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;11.8&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;asw&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;15.59&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;words&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;sentences&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sentences&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;syllables&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This takes about 20 lines, and it's also why no two readability tools agree exactly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why different tools give different scores
&lt;/h3&gt;

&lt;p&gt;The formulas are fixed. The &lt;strong&gt;counting&lt;/strong&gt; isn't.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Syllables are guessed.&lt;/strong&gt; English spelling doesn't map cleanly to sound, so almost every tool uses a heuristic like the one above. It counts "client" as one syllable (it's two) and "effectuated" as three (it's five). Dictionary-based counters do better on common words and worse on names and jargon. A difference of 0.1 in ASW moves FRE by about 8.5 points.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sentence detection varies.&lt;/strong&gt; The regex above only counts text ending in &lt;code&gt;.&lt;/code&gt;, &lt;code&gt;!&lt;/code&gt; or &lt;code&gt;?&lt;/code&gt;. A bullet list with no full stops can collapse into one giant "sentence" and tank the score. Some tools split on line breaks too, and abbreviations like "e.g." or "Dr." can add fake sentences.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What counts as a word.&lt;/strong&gt; Numbers, URLs, hyphenated words and emoji are handled differently everywhere.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Practical rule:&lt;/strong&gt; compare scores &lt;strong&gt;from the same tool&lt;/strong&gt;, before and after an edit. Don't compare your score in one tool with a target someone measured in another.&lt;/p&gt;

&lt;h3&gt;
  
  
  What the scores are good for, and what they're not
&lt;/h3&gt;

&lt;p&gt;They're useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Catching run-on sentences and jargon in help docs, onboarding emails, error messages and landing pages.&lt;/li&gt;
&lt;li&gt;Tracking whether an edit made something simpler (same tool, before and after).&lt;/li&gt;
&lt;li&gt;A rough check against a target audience. For general web writing, a common guideline is a reading-ease score of about 60–70 or higher, roughly grade 7–8.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They're not useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Judging quality.&lt;/strong&gt; "Dog cat sun run." scores as extremely easy and means nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Very short text.&lt;/strong&gt; One sentence is too small a sample. Paste at least a few paragraphs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code, lists and tables.&lt;/strong&gt; Missing punctuation breaks sentence counting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-English text.&lt;/strong&gt; The constants were fitted to English. Other languages need their own adapted formulas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Quick editing moves that actually move the numbers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Split sentences longer than about 25 words.&lt;/strong&gt; ASL has the biggest lever in FKGL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swap the long word for the short one&lt;/strong&gt; when the meaning is the same: "use" for "utilise", "help" for "facilitate", "pay" for "remit".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turn inline lists into bullets&lt;/strong&gt; with full stops, if you'll measure them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-check, but don't chase a number.&lt;/strong&gt; Once you're in range, clarity beats shaving off another point.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Try it without writing code
&lt;/h3&gt;

&lt;p&gt;If you just want the two numbers for a draft, I built a free calculator that runs these two formulas in your browser. Paste text and it shows Flesch Reading Ease, Flesch–Kincaid Grade and the word, sentence and syllable counts behind them, with no signup and nothing uploaded. &lt;a href="https://beginthings.com/free-tools/readability_score_calculator.html?utm_source=devto&amp;amp;utm_medium=community&amp;amp;utm_campaign=cm-readability-20261104" rel="noopener noreferrer"&gt;Readability score calculator on BeginThings&lt;/a&gt;. Disclosure: BeginThings is my project. It deliberately does just these two formulas, so it's handy for before-and-after comparisons.&lt;/p&gt;

&lt;p&gt;What readability target does your team use for docs, and did you ever find it actually helped? Tell me in the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was drafted with AI assistance; the formulas, counts and code were checked by hand and against the calculator's source before publishing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>writing</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>a11y</category>
    </item>
    <item>
      <title>How UPI deep links work (upi://pay): build a payment link and QR code without a payment gateway</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Sat, 31 Oct 2026 09:42:42 +0000</pubDate>
      <link>https://dev.to/srvmhptr/how-upi-deep-links-work-upipay-build-a-payment-link-and-qr-code-without-a-payment-gateway-g8m</link>
      <guid>https://dev.to/srvmhptr/how-upi-deep-links-work-upipay-build-a-payment-link-and-qr-code-without-a-payment-gateway-g8m</guid>
      <description>&lt;p&gt;If you've ever tapped "Pay" on a website in India and watched your phone jump straight into Google Pay, PhonePe, Paytm or BHIM with the amount already filled in, you've used a &lt;strong&gt;UPI deep link&lt;/strong&gt;. It's just a URL that starts with &lt;code&gt;upi://pay&lt;/code&gt;, and you can build one yourself in a few lines, with no payment gateway, no merchant account and no API keys.&lt;/p&gt;

&lt;p&gt;This post explains what's in that URL, how to generate it safely in JavaScript, how to turn it into a QR code, and, just as important, what it &lt;strong&gt;can't&lt;/strong&gt; do for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  The URL format
&lt;/h3&gt;

&lt;p&gt;A UPI payment link looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;upi://pay?pa=yourname@okhdfcbank&amp;amp;am=499.00&amp;amp;tn=Logo%20design%20deposit&amp;amp;cu=INR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;upi://&lt;/code&gt; is a URI scheme. When a phone opens a link with that scheme, the operating system hands it to an installed app that has registered for it, which means any UPI app. The query parameters come from NPCI's UPI linking specification. The ones you'll actually use:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Required?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;pa&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Payee address: the UPI ID (VPA) that receives the money, e.g. &lt;code&gt;name@okicici&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;pn&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Payee name, shown to the payer by some apps&lt;/td&gt;
&lt;td&gt;Often listed as required in the spec, but many apps resolve the name from the VPA anyway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;am&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Amount, in rupees, with up to two decimals&lt;/td&gt;
&lt;td&gt;No. Leave it out and the payer types the amount&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cu&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Currency. Always &lt;code&gt;INR&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Recommended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tn&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Transaction note, e.g. "Invoice 1042"&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tr&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Transaction reference ID (mainly used by merchants)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two practical notes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Leaving out &lt;code&gt;am&lt;/code&gt; is a feature.&lt;/strong&gt; For tips, donations or "pay what you owe", an open amount is friendlier than a fixed one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The payer's app shows who they're paying.&lt;/strong&gt; Before approving, UPI apps typically display the name registered against the VPA. That's your real trust signal, more than anything you put in the link.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Building the link in JavaScript
&lt;/h3&gt;

&lt;p&gt;Don't concatenate strings by hand: a note like &lt;code&gt;Design &amp;amp; dev&lt;/code&gt; will break your query string. Let &lt;code&gt;URLSearchParams&lt;/code&gt; do the encoding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;buildUpiLink&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;upiId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;note&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;upiId&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="sr"&gt;/^&lt;/span&gt;&lt;span class="se"&gt;[\w&lt;/span&gt;&lt;span class="sr"&gt;.&lt;/span&gt;&lt;span class="se"&gt;\-]{2,}&lt;/span&gt;&lt;span class="sr"&gt;@&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-zA-Z&lt;/span&gt;&lt;span class="se"&gt;]{2,}&lt;/span&gt;&lt;span class="sr"&gt;$/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;upiId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Enter a valid UPI ID, e.g. name@okhdfcbank&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URLSearchParams&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;pa&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;upiId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="na"&gt;cu&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;INR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Amount must be a positive number&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;am&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;note&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tn&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;note&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`upi://pay?&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;buildUpiLink&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;upiId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;studio@okaxis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;note&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Website audit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;
&lt;span class="c1"&gt;// upi://pay?pa=studio%40okaxis&amp;amp;cu=INR&amp;amp;am=1500.00&amp;amp;tn=Website+audit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Things worth knowing about that output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;URLSearchParams&lt;/code&gt; encodes &lt;code&gt;@&lt;/code&gt; as &lt;code&gt;%40&lt;/code&gt; and spaces as &lt;code&gt;+&lt;/code&gt;. UPI apps generally decode both. If you see a literal &lt;code&gt;+&lt;/code&gt; in the note in a particular app, build the query with &lt;code&gt;encodeURIComponent&lt;/code&gt; instead, which gives &lt;code&gt;%20&lt;/code&gt; for spaces.&lt;/li&gt;
&lt;li&gt;The regex above is a &lt;strong&gt;sanity check, not validation&lt;/strong&gt;. The only way to know a VPA is real is to send a small payment to it. Your code can't verify ownership.&lt;/li&gt;
&lt;li&gt;Keep notes short. Apps truncate long notes differently, so a 50-character cap is a sensible default.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Turning it into a QR code
&lt;/h3&gt;

&lt;p&gt;A QR code is the same link, drawn as a matrix. The payer scans it with their UPI app's scanner, not the camera app, and gets the same prefilled screen. With the popular &lt;code&gt;qrcode&lt;/code&gt; package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;QRCode&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;qrcode&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;buildUpiLink&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;upiId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;studio@okaxis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;note&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Website audit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// In the browser, draw onto a &amp;lt;canvas id="qr"&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;QRCode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;qr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;errorCorrectionLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;H&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// survives smudges and small logos&lt;/span&gt;
  &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;240&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Or produce a PNG data URL for an invoice PDF&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pngDataUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;QRCode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toDataURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;errorCorrectionLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;H&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use high error correction (&lt;code&gt;H&lt;/code&gt;) if the code will be printed on a counter card or an invoice that might get folded. Then test it with at least two different UPI apps before you print a hundred copies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where the link works, and where it doesn't
&lt;/h3&gt;

&lt;p&gt;This is the part most tutorials skip:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mobile only.&lt;/strong&gt; On a desktop browser, &lt;code&gt;upi://&lt;/code&gt; usually does nothing because no app is registered for it. On desktop, show the &lt;strong&gt;QR code&lt;/strong&gt; and keep the link for mobile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In-app browsers vary.&lt;/strong&gt; Some email clients and social apps' built-in browsers block custom schemes. If a tap does nothing, open the page in Chrome or Safari, or scan the QR code instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;iOS is less predictable than Android.&lt;/strong&gt; On Android, the system shows a chooser of UPI apps. iOS behaviour depends on which apps are installed and how they handle the scheme. Test on the devices your payers actually use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apps may add friction for personal VPAs.&lt;/strong&gt; Some apps show warnings or limits for link-initiated payments to non-merchant UPI IDs. That's the app protecting the payer, and you can't override it from the link.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What a deep link can't do (read this before using it for a business)
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;upi://pay&lt;/code&gt; link starts a payment. It doesn't &lt;strong&gt;confirm&lt;/strong&gt; one. There's no callback, no webhook and no "payment succeeded" event in your app. Practically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reconcile manually.&lt;/strong&gt; Match incoming credits in your bank or UPI app against the note or amount. A unique note per invoice ("INV-1042") makes this much easier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Depending on the app, a payer may be able to change a prefilled amount&lt;/strong&gt;, and nothing stops them from paying twice. Treat the link as a convenience, not an enforcement mechanism.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For order systems, use a gateway.&lt;/strong&gt; If you need automatic confirmation, refunds, receipts or subscriptions, use a payment gateway (Razorpay, Cashfree, PayU and others). They issue merchant VPAs and send you webhooks. Deep links are for freelancers, small sellers, event collections and invoices, where a human checks the bank statement anyway.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Good uses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Freelance invoices:&lt;/strong&gt; add the link and QR code to the PDF so a client on their phone can pay in two taps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WhatsApp and email follow-ups:&lt;/strong&gt; "Here's the link for the ₹1,500 deposit" beats sending your UPI ID and asking them to type it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Events and group collections:&lt;/strong&gt; one QR code on a poster, with an open amount.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tip jars and donation buttons&lt;/strong&gt; on a personal site, shown as a QR code on desktop.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Shortcut, if you don't want to write code
&lt;/h3&gt;

&lt;p&gt;I built a free generator that does exactly the steps above in the browser: enter a UPI ID, an optional amount and an optional note, and you get the &lt;code&gt;upi://pay&lt;/code&gt; link plus a QR code to copy or save. There's no signup and no gateway in between, and it doesn't add a payee name, so the payer's app shows the name linked to your UPI ID. &lt;a href="https://beginthings.com/free-tools/payment-link-creator.html?utm_source=devto&amp;amp;utm_medium=community&amp;amp;utm_campaign=cm-upi-deeplinks-20261028" rel="noopener noreferrer"&gt;UPI payment link creator on BeginThings&lt;/a&gt;. Disclosure: BeginThings is my project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Checklist before you share a UPI link
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Test the link and the QR code with two different UPI apps.&lt;/li&gt;
&lt;li&gt;Check that the payee name the app shows is the one your payer expects.&lt;/li&gt;
&lt;li&gt;Use a unique note per invoice so reconciliation takes seconds.&lt;/li&gt;
&lt;li&gt;On desktop pages, show the QR code first and the link second.&lt;/li&gt;
&lt;li&gt;Don't promise "instant confirmation". A deep link can't give you one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you've hit an app-specific quirk with &lt;code&gt;upi://pay&lt;/code&gt; links, I'd love to hear which app and what happened, in the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was drafted with AI assistance and checked against the generator's source code and NPCI's published parameter names before publishing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>upi</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>india</category>
    </item>
    <item>
      <title>Shipping a Framer template + 3 booking widgets in a weekend — launch-day postmortem</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Tue, 14 Apr 2026 17:11:43 +0000</pubDate>
      <link>https://dev.to/srvmhptr/shipping-a-framer-template-3-booking-widgets-in-a-weekend-launch-day-postmortem-3594</link>
      <guid>https://dev.to/srvmhptr/shipping-a-framer-template-3-booking-widgets-in-a-weekend-launch-day-postmortem-3594</guid>
      <description>&lt;p&gt;Most clinic websites cost $2k+ and convert like a Canva kit. I got tired of looking at them, so I built the opposite — a Framer template plus three drop-in booking widgets built specifically for aesthetic / derm clinics, shipped as a single ZIP. This is the honest launch-day postmortem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The product
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Noir Clinic Conversion Pack&lt;/strong&gt; — a 10-section Framer template (dark-luxe, Fraunces + Inter) plus three booking widgets shipped as both vanilla JS and Framer TSX:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pricing Estimator&lt;/strong&gt; — real-time price calc, service + area + tier, because "contact us for pricing" is a conversion killer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Before/After Slider&lt;/strong&gt; — touch-draggable comparison, replaces static portfolio grids.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sticky WhatsApp Booking Bar&lt;/strong&gt; — region-aware, falls back to phone on desktop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three widgets are plain-text config. No node_modules, no build step for the JS versions. The Framer bundle is the main event; the vanilla widgets work anywhere you can paste three files.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Site:&lt;/strong&gt; static HTML + vanilla CSS on Netlify (noir-style.netlify.app). No React on the landing page — I wanted &amp;lt; 100kb total and FCP under 800ms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checkout:&lt;/strong&gt; Payhip (5% fee, clean product page, supports coupons). Core $59, Pro $169.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Widgets:&lt;/strong&gt; two versions each — vanilla JS (~4kb) and Framer TSX with property controls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SEO infra:&lt;/strong&gt; sitemap.xml, robots.txt, canonical tags, og:image, twitter:card, Product JSON-LD (Core + Pro variants), meta description, GA4 snippet. All verified 200 before launch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What went right
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SEO v2 before traffic.&lt;/strong&gt; I treated the site like it had to survive indexing before I touched any social channel. Submitted sitemap to Google Search Console, archived homepage + sitemap + robots in the Wayback Machine as a trust signal, verified every secondary page (privacy, terms, refund, thank-you, demo) returned 200. All eight gates green before the first tweet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plain-text config over admin UIs.&lt;/strong&gt; Every configurable thing in the product is a &lt;code&gt;const config = { ... }&lt;/code&gt; block with inline comments. No dashboard. No database. No login. Customers can install the whole pack without ever opening Framer if they don't want to. First install time in testing: 12 minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Self-serve pricing that doesn't hide the number.&lt;/strong&gt; The #1 friction I've seen on clinic sites is "contact us for a quote." The estimator widget quotes instantly. This is a conversion decision, not a design decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do differently
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gumroad mirror should have been day 0, not day 2.&lt;/strong&gt; Payhip-only launch means I'm dependent on one checkout path. Mirroring to Gumroad at a slightly higher list price ($79 vs $59 direct) protects the direct channel and gives discovery through Gumroad's organic search — should've been ready before the first tweet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One distribution channel at a time.&lt;/strong&gt; I had five channels queued (X, Reddit, IndieHackers, Instagram, Dev.to). I posted X first, then immediately started thinking about the next channel instead of watching what the first post actually produced. You learn more from 24h of data on one channel than from scatter-posting five variants simultaneously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first tweet needed a thread, not a single tweet.&lt;/strong&gt; A product link without a thread of substance gets treated as an ad by the algorithm. A thread with actual content ("here's what I learned about clinic-site conversion," then the product) performs 3-5x better. Lesson for next launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers I'm watching
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sessions → order conversion rate (target: ≥ 2% to validate price)&lt;/li&gt;
&lt;li&gt;Pro vs Core mix (tells me whether agencies or solo clinics bought)&lt;/li&gt;
&lt;li&gt;Refund rate (target: &amp;lt; 5%; anything higher means the page overpromised)&lt;/li&gt;
&lt;li&gt;Traffic source attribution via UTMs on every link&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Decision rule at 10 sales: if ≥ 5 came in the first 7 days, scale (Gumroad, marketplaces, Estate Pack). If 3-4, iterate on page variants. If 0-2, diagnose — sessions low means fix traffic, sessions high means fix the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you're shipping a niche SaaS-style template
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick a vertical where the current websites are objectively bad (aesthetic clinics, dental, boutique fitness — massive opportunity).&lt;/li&gt;
&lt;li&gt;Ship the SEO/indexing surfaces &lt;strong&gt;before&lt;/strong&gt; the social push. Once Google starts crawling, you want every meta tag and structured-data block correct.&lt;/li&gt;
&lt;li&gt;Write the product description like someone's about to buy it in 30 seconds — above-the-fold specificity, not adjectives.&lt;/li&gt;
&lt;li&gt;Config-driven &amp;gt; dashboard-driven for small creators. You do not want to maintain an admin panel for a $59 product.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Live demo + buy page: &lt;a href="https://noir-style.netlify.app/?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=noir-launch&amp;amp;utm_content=v1-devto" rel="noopener noreferrer"&gt;noir-style.netlify.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to answer anything in the comments — especially on the widget architecture, the Framer TSX property-controls setup, or the SEO pre-launch checklist.&lt;/p&gt;

</description>
      <category>indiehackers</category>
      <category>webdev</category>
      <category>startup</category>
      <category>marketing</category>
    </item>
    <item>
      <title>I Built 100+ Free Browser Tools That Actually Respect Your Privacy</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Thu, 12 Mar 2026 18:29:04 +0000</pubDate>
      <link>https://dev.to/srvmhptr/i-built-126-free-browser-tools-that-actually-respect-your-privacy-1190</link>
      <guid>https://dev.to/srvmhptr/i-built-126-free-browser-tools-that-actually-respect-your-privacy-1190</guid>
      <description>&lt;p&gt;Every time I needed a simple online tool, the experience was the same. Sign up. Watch ads. Wonder if my data was being sold. So I built &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;beginthings.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It now has &lt;strong&gt;100+ free browser-based tools&lt;/strong&gt;. JSON formatters, image converters, SEO auditors, color pickers, QR generators, calculators, and much more. Everything runs locally in your browser. Browser-based processing, no accounts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Built This
&lt;/h2&gt;

&lt;p&gt;Simple tools should be simple. Need to resize an image? You should not need to create an account. Need to format JSON? You should not have to watch a 30-second ad first. I started building one tool at a time and it grew into a full collection.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes It Different
&lt;/h2&gt;

&lt;p&gt;Every tool on beginthings.com runs entirely in your browser. The tools run right in your browser, with no account needed. Google Analytics only runs if you accept the cookie banner. Just open the site, use what you need, and close the tab.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Will Find
&lt;/h2&gt;

&lt;p&gt;The collection covers developer tools like JSON formatters, Base64 encoders, regex testers, and JWT decoders. Design tools including color pickers, gradient generators, image compressors, and SVG optimizers. SEO tools like meta tag generators, schema markup validators, and on-page audit checkers. Everyday utilities like QR code generators, unit converters, password generators, and calculators. New tools are added regularly.&lt;/p&gt;

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

&lt;p&gt;If you are tired of ad-heavy tool sites that harvest your data, give &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;beginthings.com&lt;/a&gt; a look. Bookmark it, share it with your team, or just keep it handy for the next time you need a quick tool without the hassle.&lt;/p&gt;

&lt;p&gt;I built this for people who value their privacy and their time, and I hope you find it useful.&lt;/p&gt;




&lt;p&gt;Would love to hear what tools you use the most or what you would like to see added next.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>resources</category>
    </item>
    <item>
      <title>I built 100+ free browser tools at beginthings.com -- here is the tech behind it</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Sat, 07 Mar 2026 18:39:02 +0000</pubDate>
      <link>https://dev.to/srvmhptr/i-built-90-free-browser-tools-at-beginthingscom-here-is-the-tech-behind-it-1f4f</link>
      <guid>https://dev.to/srvmhptr/i-built-90-free-browser-tools-at-beginthingscom-here-is-the-tech-behind-it-1f4f</guid>
      <description>&lt;p&gt;I have been building beginthings.com, a collection of 100+ free browser-based tools. Everything runs client-side with no server processing needed for most tools. Here is a quick overview of what is available and some of the technical thinking behind it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is beginthings.com?
&lt;/h2&gt;

&lt;p&gt;A free, no-signup, no-ads collection of browser tools. Think of it as your utility belt for common tasks that developers, designers, and content creators run into daily.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some of the tools available
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;For Developers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON formatter and validator&lt;/li&gt;
&lt;li&gt;Base64 encoder/decoder&lt;/li&gt;
&lt;li&gt;Password generator&lt;/li&gt;
&lt;li&gt;QR code generator&lt;/li&gt;
&lt;li&gt;Lorem ipsum generator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For Designers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Color palette generator&lt;/li&gt;
&lt;li&gt;Gradient creator&lt;/li&gt;
&lt;li&gt;Image compressor&lt;/li&gt;
&lt;li&gt;Image format converter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For Content Creators:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Word counter&lt;/li&gt;
&lt;li&gt;Character counter&lt;/li&gt;
&lt;li&gt;Text case converter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;General Utilities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unit converters&lt;/li&gt;
&lt;li&gt;Calculator tools&lt;/li&gt;
&lt;li&gt;File converters&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why client-side?
&lt;/h2&gt;

&lt;p&gt;Privacy and speed. Your files are processed right in your browser. An image you compress on beginthings.com is processed entirely on your device using JavaScript. No upload, no server, no waiting.&lt;/p&gt;

&lt;p&gt;This was a deliberate design choice. Most "free tool" websites upload your files to their servers for processing. That is slower, less private, and honestly unnecessary for most of these operations. Modern browsers are powerful enough to handle image compression, format conversion, encoding, and text processing without any server involvement.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tech stack
&lt;/h2&gt;

&lt;p&gt;The tools are built with vanilla JavaScript where possible, keeping things lightweight. For heavier operations like image processing, I use the Canvas API and Web Workers to keep the UI responsive. Everything is designed to load fast and work instIa nhtalvye. &lt;br&gt;
b&lt;br&gt;
e#e#n  Wbhuaitl diisn gn ebxetg?i&lt;br&gt;
n&lt;br&gt;
tIh ianmg sa.cctoimv,e lay  caodldliencgt inoenw  otfo o9l0s+  afnrde ei mbprroowvsienrg- beaxsiesdt itnogo losn.e sE.v eIrfy tthhienrge  riusn sa  ctloioeln ty-osui dwei swhi tehx insot esde ravse ra  pfrroecee sbsrionwgs enre eudteidl iftoyr,  mIo swto utlodo llso.v eH etroe  hiesa ra  aqbuoiuctk  iotv.e&lt;br&gt;
r&lt;br&gt;
vCiheewc ko fi tw hoautt  iast  a[vbaeiglianbtlhei nagnsd. csoomm]e( hotft ptsh:e/ /tbeecghinnitchailn gtsh.icnokmi)n ga nbde hlientd  miet .k&lt;br&gt;
n&lt;br&gt;
o#w#  wWhhaatt  yiosu  btehgiinnkt.hings.com?&lt;/p&gt;

&lt;p&gt;A free, no-signup, no-ads collection of browser tools. Think of it as your utility belt for common tasks that developers, designers, and content creators run into daily.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some of the tools available
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;For Developers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON formatter and validator&lt;/li&gt;
&lt;li&gt;Base64 encoder/decoder&lt;/li&gt;
&lt;li&gt;Password generator&lt;/li&gt;
&lt;li&gt;QR code generator&lt;/li&gt;
&lt;li&gt;Lorem ipsum generator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For Designers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Color palette generator&lt;/li&gt;
&lt;li&gt;Gradient creator&lt;/li&gt;
&lt;li&gt;Image compressor&lt;/li&gt;
&lt;li&gt;Image format converter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For Content Creators:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Word counter&lt;/li&gt;
&lt;li&gt;Character counter&lt;/li&gt;
&lt;li&gt;Text case converter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;General Utilities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unit converters&lt;/li&gt;
&lt;li&gt;Calculator tools&lt;/li&gt;
&lt;li&gt;File converters&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why client-side?
&lt;/h2&gt;

&lt;p&gt;Privacy and speed. Your files are processed right in your browser. An image you compress on beginthings.com is processed entirely on your device using JavaScript. No upload, no server, no waiting.&lt;/p&gt;

&lt;p&gt;This was a deliberate design choice. Most "free tool" websites upload your files to their servers for processing. That is slower, less private, and honestly unnecessary for most of these operations. Modern browsers are powerful enough to handle image compression, format conversion, encoding, and text processing without any server involvement.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tech stack
&lt;/h2&gt;

&lt;p&gt;The tools are built with vanilla JavaScript where possible, keeping things lightweight. For heavier operations like image processing, I use the Canvas API and Web Workers to keep the UI responsive. Everything is designed to load fast and work instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is next?
&lt;/h2&gt;

&lt;p&gt;I am actively adding new tools and improving existing ones. If there is a tool you wish existed as a free browser utility, I would love to hear about it.&lt;/p&gt;

&lt;p&gt;Check it out at &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;beginthings.com&lt;/a&gt; and let me know what you think.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I Built a Free Resume Builder That Works 100% in Your Browser — Here's How</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Fri, 06 Mar 2026 19:36:34 +0000</pubDate>
      <link>https://dev.to/srvmhptr/i-built-a-free-resume-builder-that-works-100-in-your-browser-heres-how-4jek</link>
      <guid>https://dev.to/srvmhptr/i-built-a-free-resume-builder-that-works-100-in-your-browser-heres-how-4jek</guid>
      <description>&lt;p&gt;Most resume builders online want your email, your data, and your money. I wanted something different — a resume builder that runs entirely in your browser with zero data collection. So I built one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it here:&lt;/strong&gt; &lt;a href="https://beginthings.com/resume-builder" rel="noopener noreferrer"&gt;BeginThings Resume Builder&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Most Resume Builders
&lt;/h2&gt;

&lt;p&gt;If you've ever tried to create a resume online, you know the drill:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign up with your email&lt;/li&gt;
&lt;li&gt;Fill in your details on their server&lt;/li&gt;
&lt;li&gt;Hit "Download" and... paywall&lt;/li&gt;
&lt;li&gt;Your personal data is now stored on someone else's server forever&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This frustrated me as a developer. A resume is one of the most personal documents you'll ever create — it has your name, phone number, email, work history, education. Why should any of that need to leave your browser?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: 100% Client-Side
&lt;/h2&gt;

&lt;p&gt;I built a resume builder that processes everything locally in your browser using pure HTML, CSS, and JavaScript. Here's what makes it different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No sign-up required&lt;/strong&gt; — just open and start building&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No data leaves your browser&lt;/strong&gt; — everything stays on your machine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free PDF export&lt;/strong&gt; — powered by html2pdf.js, no server needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple templates&lt;/strong&gt; — professional designs that actually look good&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dark mode UI&lt;/strong&gt; — because we're developers and we deserve nice things&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How It Works Under the Hood
&lt;/h2&gt;

&lt;p&gt;The entire tool is a single self-contained HTML file. No frameworks, no build tools, no backend.&lt;/p&gt;

&lt;h3&gt;
  
  
  Template Rendering
&lt;/h3&gt;

&lt;p&gt;Each resume template is a JavaScript function that takes your form data and returns styled HTML. When you switch templates, it re-renders instantly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;renderTemplate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;templateId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;templates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;modern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;renderModern&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;classic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;renderClassic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;minimal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;renderMinimal&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;templates&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;templateId&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  PDF Generation
&lt;/h3&gt;

&lt;p&gt;For PDF export, I use html2pdf.js which wraps html2canvas and jsPDF. It captures the rendered HTML resume as a canvas and converts it to a clean PDF:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;exportPDF&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;element&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resume-preview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;opt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resume.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jpeg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;quality&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.98&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;html2canvas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;jsPDF&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mm&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="nf"&gt;html2pdf&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Live Preview
&lt;/h3&gt;

&lt;p&gt;As you type in any field, the resume preview updates as you type. No "Generate" button needed — it's all reactive through input event listeners:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;input, textarea&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;updatePreview&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Single-File Architecture?
&lt;/h2&gt;

&lt;p&gt;I chose to build each tool as a single HTML file for several reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero dependencies on external servers&lt;/strong&gt; — works offline once loaded&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy to host&lt;/strong&gt; — just drop the file on any static hosting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast loading&lt;/strong&gt; — no API calls, no database queries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maximum privacy&lt;/strong&gt; — literally impossible to collect data when there's no backend&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This same architecture powers all 100+ tools on &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;BeginThings&lt;/a&gt;, including an invoice generator, business card maker, QR code generator, and many more.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned Building This
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;html2pdf.js is amazing but quirky.&lt;/strong&gt; Getting pixel-perfect PDF output requires careful CSS. Avoid &lt;code&gt;position: fixed&lt;/code&gt;, watch out for page breaks in the middle of sections, and always set a high &lt;code&gt;scale&lt;/code&gt; value for crisp text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Form UX matters more than you think.&lt;/strong&gt; Adding "Add Experience" and "Add Education" buttons with dynamic sections made the tool actually usable vs. having a fixed number of fields.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dark mode is not optional anymore.&lt;/strong&gt; My analytics showed 60%+ of users prefer dark mode. Building with a dark-first approach (light backgrounds only in the resume preview) was the right call.&lt;/p&gt;

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

&lt;p&gt;The resume builder is completely free at &lt;a href="https://beginthings.com/resume-builder" rel="noopener noreferrer"&gt;beginthings.com/resume-builder&lt;/a&gt;. No sign-up, no catch.&lt;/p&gt;

&lt;p&gt;If you find it useful, I'd love to hear your feedback. And if you're interested in the single-file architecture approach, check out the other tools at &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;beginthings.com&lt;/a&gt; — everything from PDF tools to calculators to developer utilities, all built the same way.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's your take on browser-only tools vs. traditional SaaS? Drop a comment below!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I Built a Free Collection of Browser-Based Developer Tools - No Sign-up</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Fri, 06 Mar 2026 17:09:08 +0000</pubDate>
      <link>https://dev.to/srvmhptr/i-built-20-free-browser-based-developer-tools-no-sign-up-no-ads-tracking-54fe</link>
      <guid>https://dev.to/srvmhptr/i-built-20-free-browser-based-developer-tools-no-sign-up-no-ads-tracking-54fe</guid>
      <description>&lt;p&gt;Hey DEV community! I built &lt;strong&gt;&lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;BeginThings&lt;/a&gt;&lt;/strong&gt; — a collection of free, browser-based tools for developers, designers, and freelancers. Everything runs client-side, no data leaves your browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Built This
&lt;/h2&gt;

&lt;p&gt;I was tired of tools that require sign-ups, track your data, or hit you with paywalls after 3 uses. So I built single-page HTML tools that work instantly — no backend, no cookies, no BS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer Tools
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/json-formatter.html" rel="noopener noreferrer"&gt;JSON Formatter &amp;amp; Validator&lt;/a&gt;&lt;/strong&gt; — Format, validate, minify, convert JSON to CSV, tree viewer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/base64-encoder-decoder.html" rel="noopener noreferrer"&gt;Base64 Encoder/Decoder&lt;/a&gt;&lt;/strong&gt; — Encode/decode text, files to Base64, image preview from data URIs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/password-generator.html" rel="noopener noreferrer"&gt;Password Generator&lt;/a&gt;&lt;/strong&gt; — Cryptographic random passwords, passphrases, strength checker, bulk generation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/lorem-ipsum-generator.html" rel="noopener noreferrer"&gt;Lorem Ipsum Generator&lt;/a&gt;&lt;/strong&gt; — Classic lorem ipsum, hipster ipsum, dummy data generator, name generator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/color-picker.html" rel="noopener noreferrer"&gt;Color Picker&lt;/a&gt;&lt;/strong&gt; — HEX/RGB/HSL converter, palette generator, contrast checker&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Text &amp;amp; Content Tools
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/word-counter.html" rel="noopener noreferrer"&gt;Word Counter&lt;/a&gt;&lt;/strong&gt; — Live word/character count, reading time, text analyzer, find &amp;amp; replace, case converter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/qr-code-generator.html" rel="noopener noreferrer"&gt;QR Code Generator&lt;/a&gt;&lt;/strong&gt; — URL/text/vCard/WiFi QR codes, custom colors, batch generation, scanner&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Image Tools
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://beginthings.com/image-compressor.html" rel="noopener noreferrer"&gt;Image Compressor&lt;/a&gt;&lt;/strong&gt; — Compress, resize, convert images. All processing in-browser via Canvas API&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Financial Calculators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://beginthings.com/salary-calculator-india.html" rel="noopener noreferrer"&gt;Salary Calculator (India)&lt;/a&gt; — CTC to take-home breakdown&lt;/li&gt;
&lt;li&gt;&lt;a href="https://beginthings.com/emi-calculator.html" rel="noopener noreferrer"&gt;EMI Calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://beginthings.com/sip-calculator.html" rel="noopener noreferrer"&gt;SIP Calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://beginthings.com/loan-calculator.html" rel="noopener noreferrer"&gt;Loan Calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://beginthings.com/unit-converter.html" rel="noopener noreferrer"&gt;Unit Converter&lt;/a&gt; — 10+ categories, 200+ units&lt;/li&gt;
&lt;li&gt;And more at &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;beginthings.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;Each tool is a &lt;strong&gt;single self-contained HTML file&lt;/strong&gt; — all CSS and JS inline. No frameworks, no build step, no npm. Just vanilla HTML/CSS/JS that works everywhere.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dark theme (#0a0a0a background, cyan accents)&lt;/li&gt;
&lt;li&gt;Mobile responsive&lt;/li&gt;
&lt;li&gt;JSON-LD structured data for SEO&lt;/li&gt;
&lt;li&gt;Works offline once loaded&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Embed on Your Site
&lt;/h2&gt;

&lt;p&gt;Want to embed any tool on your blog or website? Just use an iframe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://beginthings.com/json-formatter.html"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"800"&lt;/span&gt; &lt;span class="na"&gt;frameborder=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check out the &lt;a href="https://beginthings.com/embed.html" rel="noopener noreferrer"&gt;embed page&lt;/a&gt; for all available tools and embed codes.&lt;/p&gt;

&lt;h2&gt;
  
  
  NEW: Recently Added Tools
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Resume Builder
&lt;/h3&gt;

&lt;p&gt;Build professional resumes with multiple templates — fill in your details and download as PDF instantly.&lt;br&gt;
&lt;a href="https://beginthings.com/resume-builder.html" rel="noopener noreferrer"&gt;Try it →&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Invoice Generator
&lt;/h3&gt;

&lt;p&gt;Create professional invoices with auto-calculated taxes, multiple currencies, and instant PDF download.&lt;br&gt;
&lt;a href="https://beginthings.com/invoice-generator.html" rel="noopener noreferrer"&gt;Try it →&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Business Card Maker
&lt;/h3&gt;

&lt;p&gt;Design professional business cards with 8 templates, QR codes, and export to PDF/PNG.&lt;br&gt;
&lt;a href="https://beginthings.com/business-card-maker.html" rel="noopener noreferrer"&gt;Try it →&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Flowchart Maker
&lt;/h3&gt;

&lt;p&gt;Create flowcharts and diagrams with a canvas-based editor — 6 shape types, bezier connections, and export to PNG/SVG.&lt;br&gt;
&lt;a href="https://beginthings.com/flowchart-maker.html" rel="noopener noreferrer"&gt;Try it →&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  PDF Tools
&lt;/h3&gt;

&lt;p&gt;Merge, split, compress, and convert PDFs — all processing happens in your browser.&lt;br&gt;
&lt;a href="https://beginthings.com/pdf-tools.html" rel="noopener noreferrer"&gt;Try it →&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Markdown Editor
&lt;/h3&gt;

&lt;p&gt;Live preview markdown editor with syntax highlighting and export options.&lt;br&gt;
&lt;a href="https://beginthings.com/markdown-editor.html" rel="noopener noreferrer"&gt;Try it →&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Regex Tester
&lt;/h3&gt;

&lt;p&gt;Test and debug regular expressions with live matching, capture groups, and common patterns library.&lt;br&gt;
&lt;a href="https://beginthings.com/regex-tester.html" rel="noopener noreferrer"&gt;Try it →&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;We've grown from 20 to 100+ tools and counting! Building more based on community demand. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What tools do you wish existed as simple, free, no-signup browser tools?&lt;/strong&gt; Drop your ideas in the comments!&lt;/p&gt;




&lt;p&gt;Check it out: &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;beginthings.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>javascript</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I built 100+ free tools for freelancers — no login required, no paywalls, just tools that work</title>
      <dc:creator>Sourav Mahapatra</dc:creator>
      <pubDate>Thu, 05 Mar 2026 20:15:18 +0000</pubDate>
      <link>https://dev.to/srvmhptr/i-built-96-free-tools-for-freelancers-no-login-required-no-paywalls-just-tools-that-work-4o1g</link>
      <guid>https://dev.to/srvmhptr/i-built-96-free-tools-for-freelancers-no-login-required-no-paywalls-just-tools-that-work-4o1g</guid>
      <description>&lt;p&gt;Every freelancer I know has the same problem: you need a quick tool — an invoice generator, a QR code maker, a UTM builder — and every option either wants your email, locks features behind a paywall, or drowns you in ads before you can do anything.&lt;/p&gt;

&lt;p&gt;I got tired of it. So I built &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;BeginThings&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is
&lt;/h2&gt;

&lt;p&gt;BeginThings is a collection of 100+ free tools built specifically for freelancers and solopreneurs. Every tool on the site works immediately — no account, no email, no trial period. Just open it and use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tools (a sample)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Client &amp;amp; Business&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Invoice Generator — create professional invoices in seconds, download as PDF&lt;/li&gt;
&lt;li&gt;Contract Template Builder — fill-in-the-blank freelance contracts&lt;/li&gt;
&lt;li&gt;Rate Calculator — figure out your hourly rate based on income goals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Marketing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UTM Builder — generate clean UTM-tagged URLs for campaigns&lt;/li&gt;
&lt;li&gt;Bio Link Builder — create a simple link-in-bio page&lt;/li&gt;
&lt;li&gt;QR Code Maker — generate QR codes for any URL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Documents&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resume Formatter — clean, professional resume output&lt;/li&gt;
&lt;li&gt;Cover Letter Generator — structured templates for job applications&lt;/li&gt;
&lt;li&gt;PDF Merge &amp;amp; Split tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Dev &amp;amp; Web&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Base64 Encoder/Decoder&lt;/li&gt;
&lt;li&gt;JSON Formatter&lt;/li&gt;
&lt;li&gt;Color Palette Generator&lt;/li&gt;
&lt;li&gt;Meta Tag Previewer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...and 80+ more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why no login?
&lt;/h2&gt;

&lt;p&gt;I made a deliberate decision: &lt;strong&gt;zero friction&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;When you need a QR code at 11pm before a client call tomorrow morning, the last thing you want is a sign-up flow. You want the tool to just work.&lt;/p&gt;

&lt;p&gt;No account also means no data stored on my servers about your invoices, your clients, or your contracts. Everything runs in your browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned building this
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scope creep is real&lt;/strong&gt; — I started with 10 tools and "just one more" turned into 100+.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SEO for tools is brutal&lt;/strong&gt; — there's so much competition from huge sites. Organic discovery takes time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;People really do want free tools&lt;/strong&gt; — the feedback has been overwhelmingly positive. Devs, designers, writers, consultants all use it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The hardest tool to build was the invoice generator&lt;/strong&gt; — getting PDF output to look professional across browsers was painful.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;👉 &lt;a href="https://beginthings.com" rel="noopener noreferrer"&gt;beginthings.com&lt;/a&gt; — completely free, no sign-up required.&lt;/p&gt;

&lt;p&gt;I'd love to hear what tools you use most as a freelancer, or what's missing from the collection. Drop a comment!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>freelance</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
