<?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: Mansi Dev</title>
    <description>The latest articles on DEV Community by Mansi Dev (@mansi_dwivedi_06500559538).</description>
    <link>https://dev.to/mansi_dwivedi_06500559538</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%2F4280153%2F57979003-0422-468a-a00a-f33bb82fd97e.png</url>
      <title>DEV Community: Mansi Dev</title>
      <link>https://dev.to/mansi_dwivedi_06500559538</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mansi_dwivedi_06500559538"/>
    <language>en</language>
    <item>
      <title>Visualizing Vanishing Gradients &amp; Softmax Temperature in Neural Networks (Interactive Playground + NumPy Code)</title>
      <dc:creator>Mansi Dev</dc:creator>
      <pubDate>Thu, 03 Dec 2026 10:43:31 +0000</pubDate>
      <link>https://dev.to/mansi_dwivedi_06500559538/visualizing-vanishing-gradients-softmax-temperature-in-neural-networks-interactive-playground--3ddn</link>
      <guid>https://dev.to/mansi_dwivedi_06500559538/visualizing-vanishing-gradients-softmax-temperature-in-neural-networks-interactive-playground--3ddn</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Originally published on &lt;a href="https://catalystcode.dev/blogs/activation-function" rel="noopener noreferrer"&gt;CatalystCode&lt;/a&gt;&lt;/strong&gt; — includes an &lt;strong&gt;interactive browser playground&lt;/strong&gt; where you can overlay activation curves f(z) with their exact derivatives f′(z), inspect gradient health in real time, and test Softmax temperature scaling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most neural network tutorials give you a static screenshot of Sigmoid, Tanh, and ReLU and tell you to memorize: &lt;em&gt;"Sigmoid has vanishing gradients, ReLU has dead neurons, Transformers use GELU."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It clicks 10x faster when you actually &lt;strong&gt;plot the first derivative f′(z) right on top of f(z)&lt;/strong&gt; and drag the input logit z from &lt;code&gt;-5&lt;/code&gt; to &lt;code&gt;+5&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happens to Your Gradient at z = -3.0 vs. z = +3.0?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Activation&lt;/th&gt;
&lt;th&gt;Formula&lt;/th&gt;
&lt;th&gt;Value at z = 3.0&lt;/th&gt;
&lt;th&gt;Gradient f′(3.0)&lt;/th&gt;
&lt;th&gt;Backprop Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sigmoid&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 / (1 + e^(-z))&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.9526&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.0452&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Vanishing (&lt;code&gt;&amp;lt; 0.05&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tanh&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tanh(z)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.9951&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.0099&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Severely saturated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ReLU&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;max(0, z)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3.0000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.0000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Healthy (&lt;code&gt;1.0&lt;/code&gt; for z &amp;gt; 0, &lt;code&gt;0.0&lt;/code&gt; dead for z &amp;lt; 0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GELU&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.5 · z · (1 + erf(z / √2))&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2.9960&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.0119&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smooth non-zero gradient near 0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Swish (SiLU)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;z · σ(βz)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2.8577&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.0881&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smooth self-gated gradient&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Notice why deep networks with Sigmoid stall: even at a modest logit of z = 3.0, the derivative drops below &lt;code&gt;0.05&lt;/code&gt;. Multiply &lt;code&gt;0.045&lt;/code&gt; across 8 layers during backpropagation and the gradient shrinks to 10⁻¹¹.&lt;/p&gt;

&lt;h2&gt;
  
  
  Softmax &amp;amp; Temperature Scaling (T)
&lt;/h2&gt;

&lt;p&gt;In classification and LLM token sampling, raw logits zᵢ are converted into probabilities with an optional temperature T:&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;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;softmax_with_temperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logits&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;scaled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;logits&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;temperature&lt;/span&gt;
    &lt;span class="n"&gt;shifted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;scaled&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scaled&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;exp_vals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shifted&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;exp_vals&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exp_vals&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;logits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;2.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.6&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="s2"&gt;"T=0.25 (Sharp):   "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;softmax_with_temperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logits&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&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="s2"&gt;"T=1.00 (Standard):"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;softmax_with_temperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logits&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.00&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&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="s2"&gt;"T=2.20 (Soft):    "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;softmax_with_temperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logits&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;2.20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&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;Low T (&lt;code&gt;0.25&lt;/code&gt;)&lt;/strong&gt;: Concentrates probability mass on the highest logit (low Shannon entropy).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High T (&lt;code&gt;2.20&lt;/code&gt;)&lt;/strong&gt;: Flattens the distribution so lower-scoring classes stay competitive (high entropy).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try the Interactive Browser Playground
&lt;/h2&gt;

&lt;p&gt;In the full article on CatalystCode, you can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Toggle &lt;strong&gt;ReLU, GELU, Swish, Sigmoid, Tanh, Leaky ReLU, and ELU&lt;/strong&gt; and overlay &lt;strong&gt;f(z) + dashed derivative f′(z)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Drag sliders for &lt;strong&gt;z&lt;/strong&gt;, &lt;strong&gt;Leaky/ELU slope α&lt;/strong&gt;, and &lt;strong&gt;Swish β&lt;/strong&gt; to watch the &lt;strong&gt;Backprop Gradient Health&lt;/strong&gt; badge flip between &lt;code&gt;Healthy Flow&lt;/code&gt;, &lt;code&gt;Vanishing&lt;/code&gt;, and &lt;code&gt;Dead Neuron&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Experiment with the &lt;strong&gt;Softmax Temperature Simulator&lt;/strong&gt; and copy the matching NumPy snippet in one click.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://catalystcode.dev/blogs/activation-function#interactive-activation-playground" rel="noopener noreferrer"&gt;Open the Interactive Activation Function &amp;amp; Softmax Playground on CatalystCode&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>Stop Memorizing 140-Character Ghostscript Flags: Offline PDF Compression on Ubuntu with Rust (PDFGraph)</title>
      <dc:creator>Mansi Dev</dc:creator>
      <pubDate>Thu, 03 Dec 2026 10:41:46 +0000</pubDate>
      <link>https://dev.to/mansi_dwivedi_06500559538/stop-memorizing-140-character-ghostscript-flags-offline-pdf-compression-on-ubuntu-with-rust-413b</link>
      <guid>https://dev.to/mansi_dwivedi_06500559538/stop-memorizing-140-character-ghostscript-flags-offline-pdf-compression-on-ubuntu-with-rust-413b</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Originally published on &lt;a href="https://catalystcode.dev/blogs/offline-pdf-compression-ubuntu-pdfgraph" rel="noopener noreferrer"&gt;CatalystCode&lt;/a&gt;&lt;/strong&gt; — includes an interactive Ubuntu CLI command builder where you pick your document type and copy the exact command + verification checks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you have ever tried to shrink a sensitive PDF (tax returns, contracts, medical scans, or research papers) on Ubuntu without uploading it to a third-party website, you have probably copy-pasted this Ghostscript incantation from AskUbuntu:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \
   -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It works great for 300–600 DPI scans—until you run it on a text/vector report and discover two annoying problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ghostscript can actually make text-heavy PDFs larger&lt;/strong&gt; or degrade sharp vector diagrams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you run &lt;code&gt;qpdf&lt;/code&gt; instead&lt;/strong&gt;, it cleans up object streams losslessly, but won't shrink a 25 MB scanned receipt because it doesn't downsample embedded images.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A Cleaner Offline Workflow: QPDF + Ghostscript + Validation
&lt;/h2&gt;

&lt;p&gt;That friction is why I built &lt;a href="https://github.com/catalystcode-dev/PDFGraph" rel="noopener noreferrer"&gt;&lt;strong&gt;PDFGraph&lt;/strong&gt;&lt;/a&gt;, an open-source MIT-licensed Rust CLI wrapper for Ubuntu/Linux that coordinates &lt;strong&gt;QPDF&lt;/strong&gt; and &lt;strong&gt;Ghostscript&lt;/strong&gt; locally—with zero uploads, no accounts, and no telemetry.&lt;/p&gt;

&lt;p&gt;Instead of guessing which engine will work best, PDFGraph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs a &lt;strong&gt;lossless QPDF pass&lt;/strong&gt; by default (preserving 100% of image resolution and vector sharpness).&lt;/li&gt;
&lt;li&gt;Optionally runs a &lt;strong&gt;Ghostscript image-downsampling candidate&lt;/strong&gt; (&lt;code&gt;--mode balanced&lt;/code&gt; at ~150 DPI, or &lt;code&gt;--mode small&lt;/code&gt; at ~100–110 DPI).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validates candidate outputs&lt;/strong&gt; and protects your existing files from accidental overwrite unless &lt;code&gt;--force&lt;/code&gt; is passed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Quick Start on Ubuntu
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Text reports &amp;amp; diagrams (100% lossless image resolution)&lt;/span&gt;
pdfgraph report.pdf -o report-lossless.pdf

&lt;span class="c"&gt;# 2. Scanned papers &amp;amp; photo-heavy decks (~150 DPI balanced)&lt;/span&gt;
pdfgraph scan.pdf --mode balanced -o scan-balanced.pdf

&lt;span class="c"&gt;# 3. Strict email / upload portal limits (inspect small footnotes after!)&lt;/span&gt;
pdfgraph scan.pdf --mode small -o scan-small.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Always Verify Before Sharing
&lt;/h3&gt;

&lt;p&gt;Never trust a compression pass blindly—check file size, page count, and selectable text locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -lh scan.pdf scan-balanced.pdf
pdfinfo scan-balanced.pdf &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"Pages|File size"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Full Setup Guide + Interactive Ubuntu Command Builder
&lt;/h2&gt;

&lt;p&gt;The full installation steps (including &lt;code&gt;qpdf&lt;/code&gt;, &lt;code&gt;ghostscript&lt;/code&gt;, and Rust/Cargo setup), troubleshooting checklist, and an &lt;strong&gt;interactive command builder&lt;/strong&gt; (pick your PDF type → get the exact &lt;code&gt;pdfgraph&lt;/code&gt; + &lt;code&gt;pdfinfo&lt;/code&gt; verification command) are live in the original post:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://catalystcode.dev/blogs/offline-pdf-compression-ubuntu-pdfgraph" rel="noopener noreferrer"&gt;Read the full guide &amp;amp; try the interactive command builder on CatalystCode&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Source code: &lt;a href="https://github.com/catalystcode-dev/PDFGraph" rel="noopener noreferrer"&gt;github.com/catalystcode-dev/PDFGraph&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>linux</category>
      <category>rust</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How to Find Out the Age of Any Domain Name (3 Quick Ways)</title>
      <dc:creator>Mansi Dev</dc:creator>
      <pubDate>Thu, 03 Dec 2026 09:34:02 +0000</pubDate>
      <link>https://dev.to/mansi_dwivedi_06500559538/how-to-find-out-the-age-of-any-domain-name-3-quick-ways-39io</link>
      <guid>https://dev.to/mansi_dwivedi_06500559538/how-to-find-out-the-age-of-any-domain-name-3-quick-ways-39io</guid>
      <description>&lt;p&gt;An online store says "Trusted since 2012," but was its domain registered last week?&lt;/p&gt;

&lt;p&gt;Before you pay a shop you've never heard of, buy a domain from someone, or size up a competitor, it's worth knowing how long the domain has really existed. That date isn't secret: in most cases the registry that runs the domain ending (Verisign for &lt;code&gt;.com&lt;/code&gt;, for example) publishes it. Here are three ways to look it up.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The quickest way: a free online checker
&lt;/h2&gt;

&lt;p&gt;Paste a domain or any full URL into the &lt;a href="https://catalystcode.dev/domain-age-checker" rel="noopener noreferrer"&gt;Domain Age Checker&lt;/a&gt; (disclosure: I built it). It shows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the exact age in years, months and days&lt;/li&gt;
&lt;li&gt;the registration, expiry and last-updated dates&lt;/li&gt;
&lt;li&gt;the registrar, nameservers and DNSSEC status&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lookup runs in your browser against the official registry data, so the domains you check aren't logged on any server.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. From the terminal
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;whois&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;macOS includes &lt;code&gt;whois&lt;/code&gt;. On Ubuntu or Debian, install it with &lt;code&gt;sudo apt install whois&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;whois github.com &lt;span class="o"&gt;|&lt;/span&gt; grep -i &lt;span class="s2"&gt;"creation date"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Creation Date: 2007-10-09T18:20:50Z
Creation Date: 2007-10-09T18:20:50.000+00:00
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get two lines because &lt;code&gt;whois&lt;/code&gt; asks both the registry and the registrar, and each writes the date its own way. That's the main problem with WHOIS: it's free-form text, and every server formats it differently.&lt;/p&gt;

&lt;h3&gt;
  
  
  RDAP, the modern replacement
&lt;/h3&gt;

&lt;p&gt;RDAP (Registration Data Access Protocol) is the official successor to WHOIS. It answers in JSON over HTTPS, with dates in one standard format. Since January 2025, RDAP, not WHOIS, is the official source of registration data for generic domain endings like &lt;code&gt;.com&lt;/code&gt;, &lt;code&gt;.org&lt;/code&gt; and &lt;code&gt;.dev&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You don't need to know which registry runs a domain, because &lt;code&gt;rdap.org&lt;/code&gt; forwards your request to the right one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sL https://rdap.org/domain/github.com \
  &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.events[] | select(.eventAction == "registration") | .eventDate'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2007-10-09T18:20:50Z
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the &lt;code&gt;-L&lt;/code&gt;: rdap.org answers with a redirect to the registry's own server (&lt;code&gt;rdap.verisign.com&lt;/code&gt; for &lt;code&gt;.com&lt;/code&gt;). If you don't have &lt;code&gt;jq&lt;/code&gt;, install it with &lt;code&gt;sudo apt install jq&lt;/code&gt; on Ubuntu or &lt;code&gt;brew install jq&lt;/code&gt; on macOS.&lt;/p&gt;

&lt;p&gt;The same &lt;code&gt;events&lt;/code&gt; list also has &lt;code&gt;expiration&lt;/code&gt; and &lt;code&gt;last changed&lt;/code&gt; entries, so one request also tells you when the domain is up for renewal.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. In code (Node.js)
&lt;/h2&gt;

&lt;p&gt;Here's the same RDAP lookup as a small function for Node.js 18 or later:&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;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getDomainAge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;domain&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;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`https://rdap.org/domain/${domain}`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// rdap.org blocks Node's default User-Agent, so give your script a name&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"User-Agent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"domain-age-script/1.0"&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="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;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&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="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`RDAP lookup failed (${res.status})`&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;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&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;reg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&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;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;eventAction&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"registration"&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;reg&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="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"This registry doesn't publish a registration date"&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;days&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;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&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="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;eventDate&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;86_400_000&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="n"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;registered&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;reg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;eventDate&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;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;years&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;365.25&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="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="nf"&gt;getDomainAge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"github.com"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// { domain: 'github.com', registered: '2007-10-09', days: 6994, years: 19.1 }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Watch out for that &lt;code&gt;User-Agent&lt;/code&gt; header. Without it, Node's &lt;code&gt;fetch&lt;/code&gt; gets a &lt;strong&gt;403&lt;/strong&gt; from rdap.org, even though the same request works with curl. The firewall in front of rdap.org rejects Node's default identity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the date can and can't tell you
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's the age of the current registration.&lt;/strong&gt; If a domain expires and someone registers it again later, the date starts over. Moving to another registrar or changing nameservers doesn't reset it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A brand-new domain is a warning sign, not proof.&lt;/strong&gt; Many scam and phishing sites are only days or weeks old, but so is every honest new project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Age alone doesn't boost your Google ranking.&lt;/strong&gt; Older sites tend to have more content and more links pointing to them, and that's what helps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some country-code domains don't support RDAP yet,&lt;/strong&gt; or hide the creation date. For those, use the registry's own WHOIS service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want to know how long the website has existed, not just the domain?&lt;/strong&gt; The &lt;a href="https://web.archive.org/" rel="noopener noreferrer"&gt;Wayback Machine&lt;/a&gt; shows the oldest saved copy of a site.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Just need the answer? Use the &lt;a href="https://catalystcode.dev/domain-age-checker" rel="noopener noreferrer"&gt;Domain Age Checker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Writing a script? Request &lt;code&gt;https://rdap.org/domain/&amp;lt;domain&amp;gt;&lt;/code&gt; and read the &lt;code&gt;registration&lt;/code&gt; event.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you work with DNS or email setups, I've also put a free &lt;a href="https://catalystcode.dev/dns-lookup" rel="noopener noreferrer"&gt;DNS lookup&lt;/a&gt; and an &lt;a href="https://catalystcode.dev/email-security-checker" rel="noopener noreferrer"&gt;SPF &amp;amp; DMARC checker&lt;/a&gt; on the same site.&lt;/p&gt;

</description>
      <category>news</category>
      <category>javascript</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
