<?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: GoToolsOnline</title>
    <description>The latest articles on DEV Community by GoToolsOnline (@gotoolsonline).</description>
    <link>https://dev.to/gotoolsonline</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%2F4181505%2Fb92ef66f-f4ff-44cd-9b6a-5f7fb36e5e12.png</url>
      <title>DEV Community: GoToolsOnline</title>
      <link>https://dev.to/gotoolsonline</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gotoolsonline"/>
    <language>en</language>
    <item>
      <title>PDF passwords explained: user vs owner password, and what 'restrictions' really do</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Mon, 23 Nov 2026 11:03:02 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/pdf-passwords-explained-user-vs-owner-password-and-what-restrictions-really-do-1eh9</link>
      <guid>https://dev.to/gotoolsonline/pdf-passwords-explained-user-vs-owner-password-and-what-restrictions-really-do-1eh9</guid>
      <description>&lt;p&gt;If you've ever generated or received a protected PDF, you've met two passwords that are easy to confuse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User (open) password&lt;/strong&gt; — required to open the file at all. With AES-256 this is real encryption: without the password, the content can't be read.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Owner (permissions) password&lt;/strong&gt; — controls what someone who &lt;em&gt;can&lt;/em&gt; open the file may do: print, copy text, edit, fill forms, rearrange pages. A file can have only an owner password, in which case it opens without any prompt.&lt;/p&gt;

&lt;p&gt;The honest caveat: permission flags are enforced by the PDF reader. Well-behaved readers (Acrobat, browsers) respect them, but they are not encryption of the actions themselves. Treat "no copy" as a polite request backed by most software, not a guarantee. If content must stay secret, use an open password and share it through a different channel than the file.&lt;/p&gt;

&lt;p&gt;Practical tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prefer AES-256. RC4 and 40-bit encryption from old tools are broken.&lt;/li&gt;
&lt;li&gt;Use different user and owner passwords; if they match, anyone who can open the file can also change its permissions.&lt;/li&gt;
&lt;li&gt;Don't email the password in the same message as the PDF.&lt;/li&gt;
&lt;li&gt;Test the output in a second reader before sending it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline, and its free PDF password tool sets separate open and owner passwords, print/copy/edit/form/page restrictions, and AES-256 (or AES-128) for up to 20 files at once: &lt;a href="https://gotoolsonline.com/tools/pdf-password-protect" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/pdf-password-protect&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>security</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Base64 images in CSS and HTML: when inlining helps and when it hurts</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Mon, 23 Nov 2026 04:59:02 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/base64-images-in-css-and-html-when-inlining-helps-and-when-it-hurts-31na</link>
      <guid>https://dev.to/gotoolsonline/base64-images-in-css-and-html-when-inlining-helps-and-when-it-hurts-31na</guid>
      <description>&lt;p&gt;Inlining an image as a data URI (data:image/png;base64,...) saves an HTTP request. It also makes the image about 33% bigger, because Base64 turns every 3 bytes into 4 characters. Whether that's a good trade depends on the image.&lt;/p&gt;

&lt;h3&gt;
  
  
  When inlining is reasonable
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Tiny icons and UI bits (a few hundred bytes to ~2 KB) that would otherwise be separate requests.&lt;/li&gt;
&lt;li&gt;Single-file deliverables: an HTML email template, an offline report, a demo in one file.&lt;/li&gt;
&lt;li&gt;Images in JSON APIs that are documented as "base64-encoded".&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When it hurts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Anything big. A 200 KB photo becomes ~267 KB of text inside your CSS or HTML, which blocks rendering and can't be cached separately.&lt;/li&gt;
&lt;li&gt;Images used on many pages. A normal file is downloaded once and cached; an inlined copy is re-downloaded with every stylesheet or page that contains it.&lt;/li&gt;
&lt;li&gt;Images that change often: every change invalidates the whole CSS file.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SVG is a special case
&lt;/h3&gt;

&lt;p&gt;For SVG, URL-encoding (data:image/svg+xml,%3Csvg...) is usually shorter than Base64, because SVG is already text.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick checklist
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Under ~2 KB and used in one place? Inline is fine.&lt;/li&gt;
&lt;li&gt;Bigger, or reused? Keep it a file and let the cache do its job.&lt;/li&gt;
&lt;li&gt;With HTTP/2 and HTTP/3, the "save a request" benefit is smaller than it used to be, so lean towards files.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline. If you need to convert, its image-to-Base64 tool runs in your browser, shows how much bigger the Base64 is in percent, and outputs a data URI, raw Base64, a CSS rule, an img tag, Markdown or JSON: &lt;a href="https://gotoolsonline.com/tools/image-base64" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/image-base64&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>performance</category>
    </item>
    <item>
      <title>Two cron expressions that don't do what they look like</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Sun, 22 Nov 2026 08:03:16 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/two-cron-expressions-that-dont-do-what-they-look-like-3dbh</link>
      <guid>https://dev.to/gotoolsonline/two-cron-expressions-that-dont-do-what-they-look-like-3dbh</guid>
      <description>&lt;p&gt;Cron syntax is short, which makes mistakes easy to write and slow to notice. Two classic ones:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;* 9 * * *&lt;/code&gt; is not "once at 9am"
&lt;/h3&gt;

&lt;p&gt;The first field is minutes, and &lt;code&gt;*&lt;/code&gt; means every minute. So this runs &lt;strong&gt;60 times&lt;/strong&gt;, from 09:00 to 09:59. If you want once a day at nine, you need &lt;code&gt;0 9 * * *&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;0 9 1 * 1&lt;/code&gt; is not "Mondays that fall on the 1st"
&lt;/h3&gt;

&lt;p&gt;When both day-of-month and day-of-week are restricted, standard cron treats them as &lt;strong&gt;OR&lt;/strong&gt;, not AND. This runs at 09:00 on the 1st of every month &lt;em&gt;and&lt;/em&gt; on every Monday. If you really want "the 1st, only if it's a Monday", the usual trick is to schedule on Mondays and test the date inside the command, e.g. &lt;code&gt;0 9 * * 1 [ "$(date +\%d)" = "01" ] &amp;amp;&amp;amp; ./job.sh&lt;/code&gt; (note the escaped % — crontab treats a bare % as a newline).&lt;/p&gt;

&lt;h3&gt;
  
  
  A few other gotchas
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Time zone: many servers and hosted schedulers (GitHub Actions included) run cron in UTC, so "9am" may be 2:30pm in India.&lt;/li&gt;
&lt;li&gt;Step values like &lt;code&gt;*/7&lt;/code&gt; in the minute field restart every hour (…:49, :56, then :00), so they aren't truly "every 7 minutes".&lt;/li&gt;
&lt;li&gt;Some systems accept extensions (&lt;code&gt;L&lt;/code&gt;, &lt;code&gt;W&lt;/code&gt;, &lt;code&gt;?&lt;/code&gt;, a seconds field) that plain crontab rejects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The safest habit is to look at the next few run times before deploying. Disclosure: I run GoToolsOnline, which has a free cron generator that explains an expression in plain English and lists the next 10 runs in your time zone or UTC: &lt;a href="https://gotoolsonline.com/tools/cron-generator" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/cron-generator&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>cron</category>
      <category>beginners</category>
    </item>
    <item>
      <title>UUID v4 vs v7 vs v5: which one should your database use?</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Sat, 21 Nov 2026 13:58:06 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/uuid-v4-vs-v7-vs-v5-which-one-should-your-database-use-4eli</link>
      <guid>https://dev.to/gotoolsonline/uuid-v4-vs-v7-vs-v5-which-one-should-your-database-use-4eli</guid>
      <description>&lt;p&gt;Every database table needs an ID, and "just use a UUID" is common advice. But which version? The differences matter for performance, privacy and design. Here is a practical comparison of v4, v7 and v5, with v1 and v6 mentioned briefly.&lt;/p&gt;

&lt;h2&gt;
  
  
  UUID v4: random
&lt;/h2&gt;

&lt;p&gt;A v4 UUID is 128 bits, of which 122 are random (the rest mark the version and variant). Collisions are astronomically unlikely, and you can generate them anywhere without coordination.&lt;/p&gt;

&lt;p&gt;The catch is ordering. Random values land all over a B-tree index. On insert-heavy tables, every new row can touch a different index page, which causes page splits, more cache misses and a bloated index.&lt;/p&gt;

&lt;h2&gt;
  
  
  UUID v7: time-ordered
&lt;/h2&gt;

&lt;p&gt;v7 is defined in RFC 9562 (2024). It starts with a 48-bit Unix timestamp in milliseconds, followed by random bits. IDs generated later sort after earlier ones, so inserts append near the end of the index much like an auto-increment key would.&lt;/p&gt;

&lt;p&gt;Trade-off: a v7 ID reveals roughly when the row was created. That is harmless for many systems, but think twice before exposing it in public URLs if creation time is sensitive.&lt;/p&gt;

&lt;h2&gt;
  
  
  UUID v5: deterministic
&lt;/h2&gt;

&lt;p&gt;v5 is the SHA-1 hash of a namespace UUID plus a name. The same input always gives the same UUID, which is handy for stable IDs derived from a URL, an email or an external key, and for idempotent imports.&lt;/p&gt;

&lt;p&gt;It is not random and not secret: anyone who knows the namespace and the name can recompute it. Do not use it for tokens or anything that must be unguessable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uuid4&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="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uuid5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;NAMESPACE_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'https://example.com'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Same input, same output, every time&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  v1 and v6, briefly
&lt;/h2&gt;

&lt;p&gt;v1 mixes a timestamp with a MAC address (a privacy leak) and its bytes are not in sortable order. v6 reorders v1's timestamp so it sorts, but v7 is generally the better choice for new designs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical advice
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;New table, high insert rate, IDs generated by your app or database: prefer v7 if your language or database supports it.&lt;/li&gt;
&lt;li&gt;IDs that must not leak creation time, or are used as unguessable identifiers: use v4.&lt;/li&gt;
&lt;li&gt;Stable ID derived from existing data: use v5, and keep the namespace constant.&lt;/li&gt;
&lt;li&gt;Store UUIDs in a native uuid or 16-byte binary column, not a 36-character string, to save space and speed up comparisons.&lt;/li&gt;
&lt;li&gt;Never treat any UUID as a security secret on its own; use proper session or API tokens for that.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these is "best" in general. Pick by what the ID needs to do: be unique, be sortable, or be reproducible.&lt;/p&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline, which has a free UUID generator for v4, v7 and v5 in bulk, with a validator: &lt;a href="https://gotoolsonline.com/tools/uuid-generator" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/uuid-generator&lt;/a&gt;&lt;/p&gt;

</description>
      <category>uuid</category>
      <category>database</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How a visual PDF signature is actually added: incremental updates vs flattening</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Sat, 21 Nov 2026 07:54:02 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/how-a-visual-pdf-signature-is-actually-added-incremental-updates-vs-flattening-513c</link>
      <guid>https://dev.to/gotoolsonline/how-a-visual-pdf-signature-is-actually-added-incremental-updates-vs-flattening-513c</guid>
      <description>&lt;p&gt;A "sign this PDF" tool looks simple: you draw or type your name, click where it goes, and download. Underneath, there are a few different things that can happen. Here is how it works in practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Turn the signature into an image
&lt;/h2&gt;

&lt;p&gt;A drawn signature is a canvas converted to a transparent PNG. A typed one is text rendered in a script font, either as an image or as real text. Either way the result is just graphics, plus optional text like a date.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Stamp it onto a page
&lt;/h2&gt;

&lt;p&gt;A PDF page is a content stream of drawing operators. To add a signature you add the image as an XObject resource on the page, then append a few operators that position and scale it, roughly "save state, move and scale, draw image, restore state". The coordinates are in points (1/72 inch) from the bottom-left of the page, so a tool must convert from where you clicked on a preview (top-left, in pixels) to PDF coordinates. It must also account for page rotation and cropped pages, which is a common source of signatures landing in the wrong place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Incremental update vs flattening
&lt;/h2&gt;

&lt;p&gt;There are two ways to save the result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Incremental update:&lt;/strong&gt; the new objects are appended to the end of the file, with a new cross-reference section. The original bytes stay untouched. This is cheap and preserves earlier content, but the previous version is still inside the file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full rewrite (flattening):&lt;/strong&gt; the document is re-serialised with the signature drawn into the page content. The file is cleaner, but the signature can no longer be moved as a separate object, and rewriting can change the file in ways that break any existing digital signatures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither is "more secure" by itself. They are just different ways of saving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Visual e-signature vs digital signature
&lt;/h2&gt;

&lt;p&gt;This is the part that gets confused most often. A visual signature is a picture of your signature on the page. It shows intent, but anyone can copy the image, and nothing in the file proves who placed it or whether the document changed afterwards.&lt;/p&gt;

&lt;p&gt;A certificate-based digital signature (for example PAdES) computes a hash of the document, signs it with a private key tied to a certificate, and stores the result in a signature field. Viewers can then tell whether the file was modified and who signed. Some contracts and jurisdictions require this. Stamping an image does not give you it. Check what your recipient actually needs before choosing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why locked PDFs should be refused
&lt;/h2&gt;

&lt;p&gt;PDFs can carry permission flags (no editing, no annotating, no form filling) enforced through encryption. A tool that is meant to respect those restrictions should refuse such files rather than strip the protection. The honest path is to ask the owner for an unrestricted copy, or the owner password.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Put the signature on the correct page, and use the page list option for multi-page documents (for example initials on every page, full signature on the last).&lt;/li&gt;
&lt;li&gt;Zoom in on the output and confirm the signature does not cover text or a signature line.&lt;/li&gt;
&lt;li&gt;Check that the file opens in at least two viewers.&lt;/li&gt;
&lt;li&gt;Keep the original. Never overwrite it with the signed copy.&lt;/li&gt;
&lt;li&gt;Remember that image signatures with sensitive handwriting should be shared carefully.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to try a browser-based version of this workflow, I built one: &lt;a href="https://gotoolsonline.com/tools/pdf-add-signature" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/pdf-add-signature&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline.&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Removing EXIF from a JPEG without re-encoding it: how the metadata is actually stored</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:56:35 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/removing-exif-from-a-jpeg-without-re-encoding-it-how-the-metadata-is-actually-stored-2933</link>
      <guid>https://dev.to/gotoolsonline/removing-exif-from-a-jpeg-without-re-encoding-it-how-the-metadata-is-actually-stored-2933</guid>
      <description>&lt;p&gt;A JPEG is just a sequence of marker segments: &lt;code&gt;FFD8&lt;/code&gt; (start of image), then a run of APPn segments, then the quantization tables (DQT), frame header (SOF), Huffman tables (DHT), and finally the scan (SOS) and &lt;code&gt;FFD9&lt;/code&gt; (end of image). Once you know that, removing metadata without touching the pixels is easy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the metadata lives
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EXIF&lt;/strong&gt; is in an APP1 segment (&lt;code&gt;FFE1&lt;/code&gt;) that starts with &lt;code&gt;Exif\0\0&lt;/code&gt;, followed by a TIFF structure of tags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XMP&lt;/strong&gt; is a second APP1 segment that starts with &lt;code&gt;http://ns.adobe.com/xap/1.0/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IPTC&lt;/strong&gt; sits in APP13 (the "Photoshop 3.0" block).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPS&lt;/strong&gt; is a sub-IFD inside EXIF. Latitude is three rationals (degrees, minutes, seconds) plus an N/S reference, and longitude works the same way with E/W.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ICC colour profile&lt;/strong&gt; is in APP2. This one is not privacy-sensitive, and you want to keep it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why not just redraw on a canvas?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;canvas.toBlob()&lt;/code&gt; does drop metadata, but it decodes and re-encodes the image. You lose quality, and you lose the ICC profile, so colours can shift.&lt;/p&gt;

&lt;h2&gt;
  
  
  Walking the segments
&lt;/h2&gt;

&lt;p&gt;Every segment after SOI has a marker and a 2-byte big-endian length, so you can copy the file byte for byte and just skip the segments you don't want:&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;stripMetadata&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&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;view&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;DataView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&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;parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;buffer&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;2&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="c1"&gt;// FFD8&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;pos&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="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pos&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;byteLength&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;marker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUint16&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pos&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;marker&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mh"&gt;0xFFDA&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// start of scan: copy the rest as-is&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;len&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUint16&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pos&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="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;isExifOrXmp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;marker&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mh"&gt;0xFFE1&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;isIptc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;marker&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mh"&gt;0xFFED&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;isExifOrXmp&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;isIptc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&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="n"&gt;pos&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pos&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;len&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;pos&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;len&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&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="n"&gt;pos&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="c1"&gt;// scan data + FFD9&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&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="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;Because nothing is decoded, the pixels are identical and there is zero quality loss.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Orientation is stored in EXIF.&lt;/strong&gt; If you strip it, rotate the pixels first, or the photo may show up sideways. Reading the orientation tag before dropping APP1 is worth it.&lt;/li&gt;
&lt;li&gt;PNG keeps metadata in &lt;code&gt;eXIf&lt;/code&gt;, &lt;code&gt;tEXt&lt;/code&gt; and &lt;code&gt;iTXt&lt;/code&gt; chunks, and WebP keeps it in &lt;code&gt;EXIF&lt;/code&gt; and &lt;code&gt;XMP&lt;/code&gt; RIFF chunks, so the same idea works there with a different container walk.&lt;/li&gt;
&lt;li&gt;Check the result by loading the output in an EXIF viewer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I run GoToolsOnline; its image metadata tool does exactly this in the browser (view EXIF/GPS/XMP/IPTC, remove all or location only, keeps ICC/orientation): &lt;a href="https://gotoolsonline.com/tools/image-metadata" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/image-metadata&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>privacy</category>
    </item>
    <item>
      <title>Why your CSS gradients look muddy in the middle (and the one-word fix)</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Fri, 20 Nov 2026 04:55:55 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/why-your-css-gradients-look-muddy-in-the-middle-and-the-one-word-fix-4phj</link>
      <guid>https://dev.to/gotoolsonline/why-your-css-gradients-look-muddy-in-the-middle-and-the-one-word-fix-4phj</guid>
      <description>&lt;p&gt;Blend blue into yellow with &lt;code&gt;linear-gradient(90deg, blue, yellow)&lt;/code&gt; and the middle turns a dull grey. That isn't your colours' fault: by default browsers mix gradient colours in sRGB, where the straight line between two colours often passes through a desaturated zone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix: interpolate in OKLab or OKLCH
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.muddy&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;yellow&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="nc"&gt;.clean&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;oklab&lt;/span&gt; &lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;yellow&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="nc"&gt;.vivid&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;oklch&lt;/span&gt; &lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;yellow&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;oklab&lt;/strong&gt; is perceptually even, so the midpoint looks like a real halfway colour.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;oklch&lt;/strong&gt; travels around the hue wheel, giving brighter, rainbow-like transitions (use &lt;code&gt;shorter hue&lt;/code&gt; / &lt;code&gt;longer hue&lt;/code&gt; to choose the direction).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Keep a fallback
&lt;/h2&gt;

&lt;p&gt;Colour-space interpolation is supported in current Chrome, Edge, Firefox and Safari, but declare the plain version first so older browsers still get a gradient:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;oklab&lt;/span&gt; &lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;yellow&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;h2&gt;
  
  
  Two more tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add a middle stop instead of fighting the blend: &lt;code&gt;linear-gradient(90deg, blue, #6aa 50%, yellow)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;conic-gradient()&lt;/code&gt; works great for pie charts and colour wheels: &lt;code&gt;conic-gradient(red 0 25%, gold 0 60%, teal 0)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Disclosure: I run GoToolsOnline. Its free CSS gradient generator does linear, radial and conic gradients with draggable stops and an OKLab/OKLCH option, and writes the fallback line for you: &lt;a href="https://gotoolsonline.com/tools/css-gradient" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/css-gradient&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>design</category>
    </item>
    <item>
      <title>Check digits explained: how barcodes catch a typo with one number</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Sun, 15 Nov 2026 13:47:26 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/check-digits-explained-how-barcodes-catch-a-typo-with-one-number-1fno</link>
      <guid>https://dev.to/gotoolsonline/check-digits-explained-how-barcodes-catch-a-typo-with-one-number-1fno</guid>
      <description>&lt;p&gt;Every EAN-13 and UPC-A barcode ends in a digit that isn't data at all. It's a check digit, and it lets a scanner (or your code) reject most typos instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The EAN-13 rule
&lt;/h2&gt;

&lt;p&gt;Take the first 12 digits. Multiply them alternately by 1 and 3, starting with 1 from the left. Add it all up. The check digit is whatever brings the total up to the next multiple of 10.&lt;/p&gt;

&lt;p&gt;Example: &lt;code&gt;400638133393?&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;digits:  4 0 0 6 3 8 1 3 3 3 9 3
weights: 1 3 1 3 1 3 1 3 1 3 1 3
sum = 4+0+0+18+3+24+1+9+3+9+9+9 = 89
check = (10 - 89 % 10) % 10 = 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the full code is &lt;code&gt;4006381333931&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  In JavaScript
&lt;/h2&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;ean13Check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first12&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;sum&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="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first12&lt;/span&gt;&lt;span class="p"&gt;]&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="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&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;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&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="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;3&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="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;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10&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;UPC-A uses the same idea on 11 digits, but the weights start with 3 instead of 1.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it catches (and doesn't)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Any single wrong digit: always caught.&lt;/li&gt;
&lt;li&gt;Most swaps of two neighbouring digits: caught, except when the two digits differ by 5 (e.g. 0↔5, 2↔7), because 3×5 = 15 ends in 5 either way.&lt;/li&gt;
&lt;li&gt;Other systems trade complexity for strength: ISBN-10 uses mod 11 (catches all adjacent swaps), and credit cards use the Luhn algorithm.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Disclosure: I run GoToolsOnline. Its free barcode generator computes and validates the check digit for EAN-13/UPC-A and other formats as you type: &lt;a href="https://gotoolsonline.com/tools/barcode-generator" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/barcode-generator&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>algorithms</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>PDF passwords: the open password vs the owner password (and why permissions alone aren’t security)</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Sun, 15 Nov 2026 07:42:04 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/pdf-passwords-the-open-password-vs-the-owner-password-and-why-permissions-alone-arent-security-3ela</link>
      <guid>https://dev.to/gotoolsonline/pdf-passwords-the-open-password-vs-the-owner-password-and-why-permissions-alone-arent-security-3ela</guid>
      <description>&lt;p&gt;Most "protect PDF" dialogs give you two password boxes and very little explanation. Here is what each one actually does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The open (user) password.&lt;/strong&gt; With this set, the file is encrypted and nobody can read its contents without the password. This is the one that gives you real confidentiality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The owner (permissions) password.&lt;/strong&gt; This lets anyone open the file, but tells the reader app to block printing, copying text, editing, filling forms or reorganising pages. Adobe Reader, Chrome, Edge and most mobile viewers respect these flags. But they are flags: a reader that ignores them, or a tool that rewrites the file, can drop them. Treat permissions as "please don't" signs for honest users, not as a lock.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which encryption?&lt;/strong&gt; PDF has used RC4-40, RC4-128, AES-128 and AES-256 over the years. Use AES-256 (PDF 2.0 / Acrobat X style) unless you must support a very old reader; then AES-128.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical rules&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Confidential file: set an open password, 12+ characters, AES-256.&lt;/li&gt;
&lt;li&gt;Shareable but not editable (e.g. a handout): owner password only, block editing and copying, allow printing.&lt;/li&gt;
&lt;li&gt;Send the password through a different channel from the file.&lt;/li&gt;
&lt;li&gt;Keep an unprotected original somewhere safe; a forgotten AES-256 open password cannot be recovered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to do it from code, qpdf does both in one line:&lt;br&gt;
&lt;code&gt;qpdf --encrypt OPENPASS OWNERPASS 256 --print=none --modify=none -- in.pdf out.pdf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline. Its free PDF Password Protect tool does the same in the browser (separate open and owner passwords, restrictions, AES-256, up to 20 files at once returned as a ZIP): &lt;a href="https://gotoolsonline.com/tools/pdf-password-protect" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/pdf-password-protect&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>security</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why your CSS gradient looks muddy in the middle (and the one-line fix)</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Sat, 14 Nov 2026 10:42:47 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/why-your-css-gradient-looks-muddy-in-the-middle-and-the-one-line-fix-5e2f</link>
      <guid>https://dev.to/gotoolsonline/why-your-css-gradient-looks-muddy-in-the-middle-and-the-one-line-fix-5e2f</guid>
      <description>&lt;p&gt;If you've ever written &lt;code&gt;linear-gradient(blue, yellow)&lt;/code&gt; and got a dull grey-ish band in the middle, the colours aren't wrong; the interpolation is. By default browsers blend gradient stops in sRGB, which isn't perceptually even. Halfway between a saturated blue and a saturated yellow in sRGB is a desaturated grey.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix: interpolate in OKLab or OKLCH
&lt;/h2&gt;

&lt;p&gt;Modern CSS lets you choose the colour space the gradient is blended in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* default: blended in sRGB, muddy middle */&lt;/span&gt;
&lt;span class="nt"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#1e40ff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#ffd400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cm"&gt;/* blended in OKLab: perceptually even, no grey band */&lt;/span&gt;
&lt;span class="nt"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;oklab&lt;/span&gt; &lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#1e40ff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#ffd400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cm"&gt;/* blended in OKLCH: goes "around" the hue wheel, very vivid */&lt;/span&gt;
&lt;span class="nt"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;oklch&lt;/span&gt; &lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#1e40ff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#ffd400&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;OKLab&lt;/strong&gt; keeps lightness changing smoothly, so it's the safe choice for most UI gradients.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OKLCH&lt;/strong&gt; interpolates hue as an angle, so blue→yellow passes through greens or pinks (you can add &lt;code&gt;shorter hue&lt;/code&gt; / &lt;code&gt;longer hue&lt;/code&gt; to pick the direction). Great for vivid hero backgrounds, sometimes too much for buttons.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Older browsers
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;in &amp;lt;colorspace&amp;gt;&lt;/code&gt; syntax is supported in current Chrome, Edge, Safari and Firefox, but an old browser will drop the whole declaration. Put a plain sRGB line first so there's always a fallback:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#1e40ff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#ffd400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;oklab&lt;/span&gt; &lt;span class="mi"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#1e40ff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#ffd400&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;
  
  
  Other small things that help
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you can't use OKLab, adding a hand-picked middle stop (e.g. a green between blue and yellow) avoids the grey band too.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;conic-gradient()&lt;/code&gt; is perfect for pie-chart style rings and colour wheels; &lt;code&gt;repeating-linear-gradient()&lt;/code&gt; gives you stripes without images.&lt;/li&gt;
&lt;li&gt;Transparent stops: &lt;code&gt;transparent&lt;/code&gt; is "transparent black" in sRGB blends, which can darken edges; using the same colour at 0 alpha (e.g. &lt;code&gt;rgb(30 64 255 / 0)&lt;/code&gt;) fades cleanly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline. I recently rebuilt its free CSS gradient generator to do linear, radial and conic (plus repeating) gradients with up to 50 draggable stops, OKLab/OKLCH blending, and it writes the sRGB fallback line for you: &lt;a href="https://gotoolsonline.com/tools/css-gradient" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/css-gradient&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>design</category>
      <category>frontend</category>
    </item>
    <item>
      <title>6 CSV edge cases that broke my "simple" CSV to JSON converter</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Mon, 19 Oct 2026 07:20:49 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/6-csv-edge-cases-that-broke-my-simple-csv-to-json-converter-4nef</link>
      <guid>https://dev.to/gotoolsonline/6-csv-edge-cases-that-broke-my-simple-csv-to-json-converter-4nef</guid>
      <description>&lt;p&gt;I run a small free tools site, and this week I audited its CSV to JSON converter against what its help text promised. The help text said "RFC 4180" and "auto-detects delimiters". The code split the file on newlines and then on commas. Here is what broke, and what the rewrite does instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Line breaks inside quoted fields
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="k"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;note&lt;/span&gt;
&lt;span class="k"&gt;Asha&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"line one
line two"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Splitting on &lt;code&gt;\n&lt;/code&gt; first turns this into three broken rows. The fix is a small state machine that walks characters and only ends a row on a newline that is &lt;em&gt;outside&lt;/em&gt; quotes.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Escaped quotes
&lt;/h2&gt;

&lt;p&gt;In CSV a literal quote inside a quoted field is written twice: &lt;code&gt;"He said ""hi"""&lt;/code&gt;. A parser that just strips the outer quotes leaves you with &lt;code&gt;He said ""hi""&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Spaces inside quotes are data
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;" Mumbai "&lt;/code&gt; should stay &lt;code&gt;" Mumbai "&lt;/code&gt;. The old code trimmed every field, which silently changes values. Only trim when the user asks for it, and never inside quotes.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Not every "CSV" uses commas
&lt;/h2&gt;

&lt;p&gt;European Excel exports often use semicolons; database dumps use tabs or pipes. Auto-detecting is simple if you count candidate delimiters on the first lines &lt;em&gt;while ignoring characters inside quotes&lt;/em&gt;, then let the user override it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Type conversion should be cautious
&lt;/h2&gt;

&lt;p&gt;Converting &lt;code&gt;"42"&lt;/code&gt; to &lt;code&gt;42&lt;/code&gt; is helpful. Converting a PIN code or employee ID like &lt;code&gt;007&lt;/code&gt; to &lt;code&gt;7&lt;/code&gt; is data loss, and a 20-digit order ID turned into a JavaScript number loses its last digits (anything above 2^53 is not exact). My rule now: numbers only when they round-trip exactly, &lt;code&gt;true&lt;/code&gt;/&lt;code&gt;false&lt;/code&gt;/&lt;code&gt;null&lt;/code&gt; as literals, everything else stays a string.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. An unclosed quote should be an error, not a guess
&lt;/h2&gt;

&lt;p&gt;If the file ends while still inside quotes, the old parser happily swallowed the rest of the file into one cell. Now it reports the problem, because a wrong JSON output that looks fine is worse than an error.&lt;/p&gt;

&lt;h2&gt;
  
  
  The other direction (JSON to CSV)
&lt;/h2&gt;

&lt;p&gt;Two things matter most: nested objects need flattening (&lt;code&gt;user.address.city&lt;/code&gt; as a column) and every field containing the delimiter, a quote, a line break or leading/trailing spaces must be quoted. If the CSV is going into Excel, writing a UTF-8 BOM keeps non-English text from turning into mojibake.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;CSV looks trivial until real files arrive. If your tool's description promises a standard, write a test file for each edge case above and run it before you ship.&lt;/p&gt;

&lt;p&gt;Disclosure: the converters I rewrote are on my site, GoToolsOnline. Both run in the browser, so the data isn't uploaded: &lt;a href="https://gotoolsonline.com/tools/csv-to-json" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/csv-to-json&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>csv</category>
      <category>json</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to convert CGPA to percentage (and why the 9.5 rule isn't universal)</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Tue, 13 Oct 2026 07:57:04 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/how-to-convert-cgpa-to-percentage-and-why-the-95-rule-isnt-universal-jd4</link>
      <guid>https://dev.to/gotoolsonline/how-to-convert-cgpa-to-percentage-and-why-the-95-rule-isnt-universal-jd4</guid>
      <description>&lt;p&gt;Many students need to convert a CGPA into a percentage for job applications, scholarship forms, or further study. The conversion looks simple, but the right formula depends on which body issued your grade sheet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The commonly cited formula
&lt;/h2&gt;

&lt;p&gt;For CBSE results, the formula most often quoted is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;percentage = CGPA x 9.5&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Worked example: a CGPA of 8.2 gives 8.2 x 9.5 = &lt;strong&gt;77.9%&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The 9.5 rule isn't universal
&lt;/h2&gt;

&lt;p&gt;The 9.5 factor is a CBSE convention. Many universities publish their own conversion formula, and the factor can be different. Anna University, VTU (Visvesvaraya Technological University) and Mumbai University each publish their own rules, so a figure calculated with 9.5 may not match what your university expects.&lt;/p&gt;

&lt;p&gt;Before you convert anything, check:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The conversion rule on your university's website, result notice, or FAQ.&lt;/li&gt;
&lt;li&gt;Whether your university issues a conversion letter or states a percentage on your transcript.&lt;/li&gt;
&lt;li&gt;What the receiving organisation asks for. Some forms accept the university's document; others ask you to state the formula you used.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Averaging SGPA into CGPA: weight by credits
&lt;/h2&gt;

&lt;p&gt;If you only have semester SGPA values, your overall CGPA is usually a credit-weighted average, not a simple average:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CGPA = (sum of SGPA x credits) / (sum of credits)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Example: Semester 1 has SGPA 8.0 for 20 credits, and Semester 2 has SGPA 7.5 for 24 credits.&lt;/p&gt;

&lt;p&gt;(8.0 x 20 + 7.5 x 24) / (20 + 24) = 340 / 44 = about 7.73&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use the credit totals from your university's scheme, not the number of subjects.&lt;/li&gt;
&lt;li&gt;Keep the decimal places your university uses, and round only at the end.&lt;/li&gt;
&lt;li&gt;Check whether repeated or cleared subjects count toward the credit total under your rules.&lt;/li&gt;
&lt;li&gt;Keep the official document with your calculation when you submit a form.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline, which has a free no-signup calculator for this: &lt;a href="https://gotoolsonline.com/tools/cgpa-to-percentage" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/cgpa-to-percentage&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>tools</category>
      <category>education</category>
    </item>
  </channel>
</rss>
