<?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: zohaib hassan</title>
    <description>The latest articles on DEV Community by zohaib hassan (@zohaib_hassan_1fdedd55e7d).</description>
    <link>https://dev.to/zohaib_hassan_1fdedd55e7d</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3967647%2Fce633683-c195-4be8-bf56-2aa3e5233897.png</url>
      <title>DEV Community: zohaib hassan</title>
      <link>https://dev.to/zohaib_hassan_1fdedd55e7d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zohaib_hassan_1fdedd55e7d"/>
    <language>en</language>
    <item>
      <title>I'm a Developer from Pakistan — Here's the Side Project I Shipped in 2024</title>
      <dc:creator>zohaib hassan</dc:creator>
      <pubDate>Thu, 04 Jun 2026 07:03:19 +0000</pubDate>
      <link>https://dev.to/zohaib_hassan_1fdedd55e7d/im-a-developer-from-pakistan-heres-the-side-project-i-shipped-in-2024-5276</link>
      <guid>https://dev.to/zohaib_hassan_1fdedd55e7d/im-a-developer-from-pakistan-heres-the-side-project-i-shipped-in-2024-5276</guid>
      <description>&lt;h1&gt;
  
  
  Regex in 10 Minutes — The Only Guide Beginners Actually Need
&lt;/h1&gt;

&lt;p&gt;Regex has a reputation for being impossible to read.&lt;/p&gt;

&lt;p&gt;This:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```text id="regex1"&lt;br&gt;
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


...is not random keyboard smashing.

It's an **email validator**.

By the end of this guide, you'll understand every character in it.

---

# What Is Regex?

Regular expressions (regex) are patterns used to match character combinations in strings.

Every major programming language supports them.

---

## Use Cases

* Validate email addresses, phone numbers, URLs
* Find and replace text
* Extract data from strings
* Parse log files
* Search in code editors

---

# The Building Blocks

## Literal Characters

The simplest regex matches exact characters:



```text id="lit1"
hello → matches "hello" in "say hello world"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Dot (.)
&lt;/h2&gt;

&lt;p&gt;Matches any single character except newline:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```text id="dot1"&lt;br&gt;
h.llo → matches "hello", "hallo", "hxllo"&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


---

## Character Classes []

Match any one character inside brackets:



```text id="class1"
[aeiou] → matches any vowel  
[0-9]   → matches any digit  
[a-z]   → matches lowercase letters  
[A-Z]   → matches uppercase letters  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quantifiers
&lt;/h2&gt;

&lt;p&gt;Control how many times something matches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;*&lt;/code&gt; → 0 or more times&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;+&lt;/code&gt; → 1 or more times&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;?&lt;/code&gt; → 0 or 1 time (optional)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;{3}&lt;/code&gt; → exactly 3 times&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;{2,5}&lt;/code&gt; → between 2 and 5 times&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Anchors
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;^&lt;/code&gt; → start of string&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$&lt;/code&gt; → end of string&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Special Character Classes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;\d&lt;/code&gt; → any digit &lt;code&gt;[0-9]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\w&lt;/code&gt; → any word character &lt;code&gt;[a-zA-Z0-9_]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\s&lt;/code&gt; → whitespace&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\D&lt;/code&gt; → non-digit&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\W&lt;/code&gt; → non-word character&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Real Examples You'll Actually Use
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Validate an Email
&lt;/h2&gt;



&lt;p&gt;```regex id="email1"&lt;br&gt;
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


### Breakdown:

* `^` → start of string
* `[a-zA-Z0-9._%+-]+` → valid username characters
* `@` → literal symbol
* `[a-zA-Z0-9.-]+` → domain name
* `\.` → literal dot
* `[a-zA-Z]{2,}` → domain extension
* `$` → end of string

---

## Validate a URL



```regex id="url1"
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Extract Numbers from Text
&lt;/h2&gt;



&lt;p&gt;```regex id="num1"&lt;br&gt;
\d+&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


Example:



```text id="ex1"
Order #12345 costs $99
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Matches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;12345&lt;/li&gt;
&lt;li&gt;99&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Validate Pakistani Phone Number
&lt;/h2&gt;



&lt;p&gt;```regex id="pk1"&lt;br&gt;
^(+92|0)[0-9]{10}$&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


---

## Remove Extra Whitespace



```regex id="space1"
\s+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace with a single space.&lt;/p&gt;




&lt;h1&gt;
  
  
  Test Your Regex Instantly
&lt;/h1&gt;

&lt;p&gt;Stop guessing in code.&lt;/p&gt;

&lt;p&gt;Use this live tester:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://onlinefreetools.online/tools/regex-tester" rel="noopener noreferrer"&gt;https://onlinefreetools.online/tools/regex-tester&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste regex patterns&lt;/li&gt;
&lt;li&gt;Test input strings&lt;/li&gt;
&lt;li&gt;See matches instantly&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Common Mistakes Beginners Make
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Forgetting to Escape Characters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.&lt;/code&gt; means any character&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\.&lt;/code&gt; means literal dot&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Not Using Anchors
&lt;/h2&gt;

&lt;p&gt;Without &lt;code&gt;^&lt;/code&gt; and &lt;code&gt;$&lt;/code&gt;, patterns may match partial strings.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;email regex without anchors&lt;/code&gt; may incorrectly match invalid strings like:
&lt;code&gt;notanemail@valid.com!!!&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Greedy Matching
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.*&lt;/code&gt; matches as much as possible&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;.*?&lt;/code&gt; for lazy matching&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Not Testing Edge Cases
&lt;/h2&gt;

&lt;p&gt;Always test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Empty strings&lt;/li&gt;
&lt;li&gt;Very long inputs&lt;/li&gt;
&lt;li&gt;Special characters&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Summary Cheat Sheet
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Any character&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\d&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Digit&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\w&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Word character&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whitespace&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;^&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Start of string&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;End of string&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0 or more&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1 or more&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;?&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Optional&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;{n}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exactly n times&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[abc]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Any of a, b, c&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[^abc]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Not a, b, or c&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;(abc)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Group&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;`a&lt;/td&gt;
&lt;td&gt;b`&lt;/td&gt;
&lt;td&gt;a or b&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Regex looks scary at first, but it becomes natural very quickly once you understand the basics.&lt;/p&gt;

&lt;p&gt;The key is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learn patterns, not memorization&lt;/li&gt;
&lt;li&gt;Test everything visually&lt;/li&gt;
&lt;li&gt;Start small, then build&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practice here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://onlinefreetools.online/tools/regex-tester" rel="noopener noreferrer"&gt;https://onlinefreetools.online/tools/regex-tester&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Within a week, regex will feel intuitive.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Zohaib Hassan&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;OnlineFreeTools.online — free browser tools for developers&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>nextjs</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Regex in 10 Minutes — The Only Guide Beginners Actually Need</title>
      <dc:creator>zohaib hassan</dc:creator>
      <pubDate>Thu, 04 Jun 2026 07:01:11 +0000</pubDate>
      <link>https://dev.to/zohaib_hassan_1fdedd55e7d/regex-in-10-minutes-the-only-guide-beginners-actually-need-26p</link>
      <guid>https://dev.to/zohaib_hassan_1fdedd55e7d/regex-in-10-minutes-the-only-guide-beginners-actually-need-26p</guid>
      <description>&lt;h1&gt;
  
  
  Regex in 10 Minutes — The Only Guide Beginners Actually Need
&lt;/h1&gt;

&lt;p&gt;Regex has a reputation for being unreadable.&lt;/p&gt;

&lt;p&gt;This:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...looks like random keyboard smashing.&lt;/p&gt;

&lt;p&gt;But it’s actually a &lt;strong&gt;valid email validator&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By the end of this guide, you’ll understand every character in it.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Is Regex?
&lt;/h1&gt;

&lt;p&gt;Regular expressions (regex) are patterns used to match combinations of characters in strings.&lt;/p&gt;

&lt;p&gt;Almost every programming language supports them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Common Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Validate emails, phone numbers, URLs&lt;/li&gt;
&lt;li&gt;Search and replace text&lt;/li&gt;
&lt;li&gt;Extract data from strings&lt;/li&gt;
&lt;li&gt;Parse logs&lt;/li&gt;
&lt;li&gt;Search within code editors&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  The Building Blocks of Regex
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Literal Characters
&lt;/h2&gt;

&lt;p&gt;The simplest regex matches exact text:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```text id="lit1"&lt;br&gt;
hello → matches "hello" in "say hello world"&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


---

## The Dot (.)

Matches any single character (except newline):



```text id="dot1"
h.llo → matches "hello", "hallo", "hxllo"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Character Classes []
&lt;/h2&gt;

&lt;p&gt;Match any ONE character inside brackets:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```text id="class1"&lt;br&gt;
[aeiou] → any vowel&lt;br&gt;
[0-9]   → any digit&lt;br&gt;
[a-z]   → lowercase letters&lt;br&gt;
[A-Z]   → uppercase letters&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


---

## Quantifiers

Control how many times a pattern repeats:

* `*` → 0 or more
* `+` → 1 or more
* `?` → 0 or 1 (optional)
* `{3}` → exactly 3 times
* `{2,5}` → between 2 and 5 times

---

## Anchors

* `^` → start of string
* `$` → end of string

Example:



```text id="anchor1"
^hello$ → matches only "hello" exactly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Special Character Classes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pattern&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\d&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Any digit (0–9)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\w&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Word character (a–z, A–Z, 0–9, _)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whitespace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\D&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Non-digit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\W&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Non-word character&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h1&gt;
  
  
  Real-World Examples
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Validate an Email
&lt;/h2&gt;



&lt;p&gt;```regex id="email1"&lt;br&gt;
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


### Breakdown:

* `^` → start of string
* `[a-zA-Z0-9._%+-]+` → valid username characters
* `@` → literal symbol
* `[a-zA-Z0-9.-]+` → domain name
* `\.` → literal dot
* `[a-zA-Z]{2,}` → domain extension
* `$` → end of string

---

## Validate a URL



```regex id="url1"
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Extract Numbers from Text
&lt;/h2&gt;



&lt;p&gt;```regex id="num1"&lt;br&gt;
\d+&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


Example:



```text
"Order #12345 costs $99"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Matches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;12345&lt;/li&gt;
&lt;li&gt;99&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Validate Pakistani Phone Number
&lt;/h2&gt;



&lt;p&gt;```regex id="pk1"&lt;br&gt;
^(+92|0)[0-9]{10}$&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


---

## Remove Extra Whitespace



```regex id="space1"
\s+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Replace with a single space.&lt;/p&gt;


&lt;h1&gt;
  
  
  Test Your Regex Instantly
&lt;/h1&gt;

&lt;p&gt;Instead of guessing inside your code, test patterns live here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://onlinefreetools.online/tools/regex-tester" rel="noopener noreferrer"&gt;https://onlinefreetools.online/tools/regex-tester&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste your regex&lt;/li&gt;
&lt;li&gt;Test input strings&lt;/li&gt;
&lt;li&gt;See matches highlighted in real time&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  Common Mistakes Beginners Make
&lt;/h1&gt;
&lt;h2&gt;
  
  
  1. Forgetting to Escape Characters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.&lt;/code&gt; means any character&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\.&lt;/code&gt; means literal dot&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  2. Missing Anchors
&lt;/h2&gt;

&lt;p&gt;Without &lt;code&gt;^&lt;/code&gt; and &lt;code&gt;$&lt;/code&gt;, your pattern may match partial strings.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;email regex without anchors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It may match invalid inputs like:&lt;br&gt;
&lt;code&gt;notanemail@valid.com!!!&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Greedy Matching
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;.*&lt;/code&gt; matches everything possible.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;.*?&lt;/code&gt; for lazy matching when needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Not Testing Edge Cases
&lt;/h2&gt;

&lt;p&gt;Always test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Empty strings&lt;/li&gt;
&lt;li&gt;Very long inputs&lt;/li&gt;
&lt;li&gt;Special characters&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Regex Cheat Sheet
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Any character&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\d&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Digit&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\w&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Word character&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whitespace&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;^&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Start of string&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;End of string&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0 or more&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1 or more&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;?&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Optional&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;{n}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exactly n times&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[abc]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Any of a, b, c&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[^abc]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Not a, b, or c&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;(abc)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Group&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;`a&lt;/td&gt;
&lt;td&gt;b`&lt;/td&gt;
&lt;td&gt;a or b&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Regex looks scary at first, but it becomes intuitive very quickly once you understand the building blocks.&lt;/p&gt;

&lt;p&gt;The key is simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learn patterns, not memorization&lt;/li&gt;
&lt;li&gt;Test everything visually&lt;/li&gt;
&lt;li&gt;Start small, build gradually&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practice here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://onlinefreetools.online/tools/regex-tester" rel="noopener noreferrer"&gt;https://onlinefreetools.online/tools/regex-tester&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Within a week, regex will feel natural.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Zohaib Hassan&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;OnlineFreeTools.online — free browser tools for developers&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I Reduced My Website's Image Size by 80% — Here's Exactly How</title>
      <dc:creator>zohaib hassan</dc:creator>
      <pubDate>Thu, 04 Jun 2026 06:57:05 +0000</pubDate>
      <link>https://dev.to/zohaib_hassan_1fdedd55e7d/i-reduced-my-websites-image-size-by-80-heres-exactly-how-13pe</link>
      <guid>https://dev.to/zohaib_hassan_1fdedd55e7d/i-reduced-my-websites-image-size-by-80-heres-exactly-how-13pe</guid>
      <description>&lt;h1&gt;
  
  
  I Reduced My Website's Image Size by 80% — Here's Exactly How
&lt;/h1&gt;

&lt;p&gt;Last month, I audited my website and discovered that images were the biggest performance bottleneck.&lt;/p&gt;

&lt;p&gt;One hero image alone was &lt;strong&gt;4.2MB&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No surprise my Lighthouse score was terrible.&lt;/p&gt;

&lt;p&gt;After optimization, that same image dropped to &lt;strong&gt;820KB&lt;/strong&gt;, and page load time improved by &lt;strong&gt;2.3 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here’s exactly what I did.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Image Size Matters More Than You Think
&lt;/h1&gt;

&lt;p&gt;Images are usually the &lt;strong&gt;largest assets on any webpage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;According to HTTP Archive, images account for &lt;strong&gt;50%+ of total page weight&lt;/strong&gt; on average.&lt;/p&gt;

&lt;p&gt;Every extra megabyte costs you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Slower page loads (especially on mobile)&lt;/li&gt;
&lt;li&gt;Higher bounce rates&lt;/li&gt;
&lt;li&gt;Lower SEO rankings (Core Web Vitals impact)&lt;/li&gt;
&lt;li&gt;Increased bandwidth costs at scale&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Understanding Image Compression
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Lossy Compression
&lt;/h2&gt;

&lt;p&gt;Lossy compression permanently removes some image data to reduce file size.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smaller file size&lt;/li&gt;
&lt;li&gt;Slight quality reduction (usually unnoticeable)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Photos&lt;/li&gt;
&lt;li&gt;Complex images with many colors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example format: &lt;strong&gt;JPEG&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Lossless Compression
&lt;/h2&gt;

&lt;p&gt;Lossless compression reduces file size without removing image data.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No quality loss&lt;/li&gt;
&lt;li&gt;Larger than lossy formats&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logos&lt;/li&gt;
&lt;li&gt;Screenshots&lt;/li&gt;
&lt;li&gt;Images with text or transparency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example format: &lt;strong&gt;PNG&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  JPEG vs PNG vs WebP vs AVIF
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;th&gt;Compression&lt;/th&gt;
&lt;th&gt;Transparency&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;JPEG&lt;/td&gt;
&lt;td&gt;Lossy&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;Photos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PNG&lt;/td&gt;
&lt;td&gt;Lossless&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;Logos, screenshots&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WebP&lt;/td&gt;
&lt;td&gt;Lossy + Lossless&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;Everything&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AVIF&lt;/td&gt;
&lt;td&gt;Lossy + Lossless&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;Next-gen web&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Recommendation (2026)
&lt;/h3&gt;

&lt;p&gt;Use &lt;strong&gt;WebP by default&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;25–35% smaller than JPEG&lt;/li&gt;
&lt;li&gt;Excellent quality retention&lt;/li&gt;
&lt;li&gt;Supported in all modern browsers&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  My Exact Optimization Process
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Step 1 — Audit Your Images
&lt;/h2&gt;

&lt;p&gt;Run your site through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google PageSpeed Insights&lt;/li&gt;
&lt;li&gt;Lighthouse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Properly size images”&lt;/li&gt;
&lt;li&gt;“Serve images in next-gen formats”&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 2 — Compress Without Losing Quality
&lt;/h2&gt;

&lt;p&gt;I used this tool:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://onlinefreetools.online/tools/image-compressor" rel="noopener noreferrer"&gt;https://onlinefreetools.online/tools/image-compressor&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Everything runs directly in the browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No uploads&lt;/li&gt;
&lt;li&gt;No server processing&lt;/li&gt;
&lt;li&gt;Instant compression&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For JPEGs, &lt;strong&gt;75–85% quality&lt;/strong&gt; is the sweet spot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No visible difference&lt;/li&gt;
&lt;li&gt;50–70% file size reduction&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 3 — Resize Images Properly
&lt;/h2&gt;

&lt;p&gt;Never serve a 2000px image inside a 400px container.&lt;/p&gt;

&lt;p&gt;Always resize images to their &lt;strong&gt;actual display dimensions&lt;/strong&gt; before compression.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4 — Use Lazy Loading
&lt;/h2&gt;



&lt;p&gt;```html id="lazy1"&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/image.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/image.jpg" alt="Description" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


This delays loading off-screen images until the user scrolls to them.

Result: faster initial page load.

---

## Step 5 — Add Width and Height



```html id="dim1"
&amp;lt;img src="image.jpg" width="800" height="600" alt="Description" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents layout shifts by reserving space before images load.&lt;/p&gt;




&lt;h1&gt;
  
  
  Results From My Site
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Asset&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;th&gt;Savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hero Image&lt;/td&gt;
&lt;td&gt;4.2 MB&lt;/td&gt;
&lt;td&gt;820 KB&lt;/td&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blog Thumbnails&lt;/td&gt;
&lt;td&gt;890 KB&lt;/td&gt;
&lt;td&gt;145 KB&lt;/td&gt;
&lt;td&gt;84%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool Screenshots&lt;/td&gt;
&lt;td&gt;1.1 MB&lt;/td&gt;
&lt;td&gt;210 KB&lt;/td&gt;
&lt;td&gt;81%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Page Weight&lt;/td&gt;
&lt;td&gt;8.4 MB&lt;/td&gt;
&lt;td&gt;1.7 MB&lt;/td&gt;
&lt;td&gt;~80%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Quick Wins You Can Do Right Now
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Compress all images using a browser tool&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;loading="lazy"&lt;/code&gt; to below-the-fold images&lt;/li&gt;
&lt;li&gt;Define width and height attributes for all images&lt;/li&gt;
&lt;li&gt;Convert hero images to WebP&lt;/li&gt;
&lt;li&gt;Replace decorative images with CSS where possible&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Image optimization is one of the fastest performance wins in web development.&lt;/p&gt;

&lt;p&gt;A faster site means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better UX&lt;/li&gt;
&lt;li&gt;Better SEO&lt;/li&gt;
&lt;li&gt;Higher conversion rates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Start with images — it's the highest-impact improvement you can make today.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Zohaib Hassan&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;OnlineFreeTools.online — 30+ free developer tools, no signup required&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>MD5 Is Broken — Stop Using It for Passwords (Use SHA256 Instead)</title>
      <dc:creator>zohaib hassan</dc:creator>
      <pubDate>Thu, 04 Jun 2026 06:54:22 +0000</pubDate>
      <link>https://dev.to/zohaib_hassan_1fdedd55e7d/md5-is-broken-stop-using-it-for-passwords-use-sha256-instead-4bon</link>
      <guid>https://dev.to/zohaib_hassan_1fdedd55e7d/md5-is-broken-stop-using-it-for-passwords-use-sha256-instead-4bon</guid>
      <description>&lt;h1&gt;
  
  
  MD5 Is Broken — Stop Using It for Passwords (Use SHA256 Instead)
&lt;/h1&gt;

&lt;p&gt;MD5 was invented in 1991. It's 2026, yet I still see developers using MD5 for password hashing in production systems.&lt;/p&gt;

&lt;p&gt;Let’s break down why this is dangerous and what you should use instead.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Is a Hash Function?
&lt;/h1&gt;

&lt;p&gt;A hash function takes any input and produces a fixed-length output called a &lt;strong&gt;digest&lt;/strong&gt; or &lt;strong&gt;hash&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is a &lt;strong&gt;one-way function&lt;/strong&gt;, meaning you cannot reverse it to get the original input.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```text id="hash1"&lt;br&gt;
Input:   "password123"&lt;br&gt;
MD5:     482c811da5d5b4bc6d497ffa98491e38&lt;br&gt;
SHA256:  ef92b778bafe771e89245b89ecbc08a44a4e166c06659911881f383d4473e94f&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


Even a small input change completely changes the output.

---

# Why MD5 Is Broken

MD5 generates a **128-bit hash**, which was considered secure decades ago.

Today, it's extremely weak.

Modern GPUs can compute **billions of MD5 hashes per second**, making brute-force attacks trivial.

---

## The Rainbow Table Problem

Attackers use precomputed databases called **rainbow tables**.

These tables map common passwords → their hash values.

So if you hash:



```text
"password123" → MD5 → known value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;An attacker can instantly look it up.&lt;/p&gt;


&lt;h2&gt;
  
  
  Collision Vulnerabilities
&lt;/h2&gt;

&lt;p&gt;Researchers have demonstrated that &lt;strong&gt;two different inputs can produce the same MD5 hash&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This breaks the core security guarantee of hash functions.&lt;/p&gt;


&lt;h1&gt;
  
  
  SHA256 — The Better Choice
&lt;/h1&gt;

&lt;p&gt;SHA256 produces a &lt;strong&gt;256-bit hash&lt;/strong&gt; and is part of the SHA-2 family.&lt;/p&gt;

&lt;p&gt;It is currently considered cryptographically secure.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```text id="sha1"&lt;br&gt;
"hello" →&lt;br&gt;
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


Even tiny changes completely change the output:



```text
"hello"  → 2cf24dba...
"Hello"  → 185f8db3...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  But Wait — Don’t Use SHA256 for Passwords Either
&lt;/h1&gt;

&lt;p&gt;This is where many developers make a mistake.&lt;/p&gt;

&lt;p&gt;SHA256 is &lt;strong&gt;not suitable for password hashing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because it is &lt;strong&gt;too fast&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Fast hashing allows attackers to brute-force passwords quickly using GPUs.&lt;/p&gt;




&lt;h1&gt;
  
  
  What You Should Use Instead
&lt;/h1&gt;

&lt;p&gt;For password storage, use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bcrypt&lt;/li&gt;
&lt;li&gt;scrypt&lt;/li&gt;
&lt;li&gt;Argon2 (recommended)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are designed to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Slow (to prevent brute-force attacks)&lt;/li&gt;
&lt;li&gt;Salted (to prevent rainbow tables)&lt;/li&gt;
&lt;li&gt;Memory intensive (harder for GPUs to crack)&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  When to Use Each Algorithm
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Algorithm&lt;/th&gt;
&lt;th&gt;Output Size&lt;/th&gt;
&lt;th&gt;Speed&lt;/th&gt;
&lt;th&gt;Security&lt;/th&gt;
&lt;th&gt;Best Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MD5&lt;/td&gt;
&lt;td&gt;128-bit&lt;/td&gt;
&lt;td&gt;Very Fast&lt;/td&gt;
&lt;td&gt;❌ Broken&lt;/td&gt;
&lt;td&gt;Legacy only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SHA1&lt;/td&gt;
&lt;td&gt;160-bit&lt;/td&gt;
&lt;td&gt;Fast&lt;/td&gt;
&lt;td&gt;❌ Weak&lt;/td&gt;
&lt;td&gt;Avoid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SHA256&lt;/td&gt;
&lt;td&gt;256-bit&lt;/td&gt;
&lt;td&gt;Fast&lt;/td&gt;
&lt;td&gt;✅ Strong&lt;/td&gt;
&lt;td&gt;Files, APIs, checksums&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bcrypt&lt;/td&gt;
&lt;td&gt;184-bit&lt;/td&gt;
&lt;td&gt;Slow&lt;/td&gt;
&lt;td&gt;✅ Strong&lt;/td&gt;
&lt;td&gt;Passwords&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argon2&lt;/td&gt;
&lt;td&gt;Variable&lt;/td&gt;
&lt;td&gt;Slowest&lt;/td&gt;
&lt;td&gt;✅ Strongest&lt;/td&gt;
&lt;td&gt;Passwords&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Real-World Use Cases
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Use SHA256 for:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;File integrity verification&lt;/li&gt;
&lt;li&gt;API request signing&lt;/li&gt;
&lt;li&gt;Digital signatures&lt;/li&gt;
&lt;li&gt;Checksums&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Use bcrypt / Argon2 for:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Password storage&lt;/li&gt;
&lt;li&gt;Sensitive credential hashing&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Try It Yourself
&lt;/h1&gt;

&lt;p&gt;You can generate hashes instantly in your browser:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://onlinefreetools.online/tools/hash-generator" rel="noopener noreferrer"&gt;https://onlinefreetools.online/tools/hash-generator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No data is sent to any server — everything runs locally in your browser.&lt;/p&gt;




&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;MD5 is broken and should never be used for security&lt;/li&gt;
&lt;li&gt;SHA256 is fine for integrity checks, not passwords&lt;/li&gt;
&lt;li&gt;Passwords should use bcrypt, scrypt, or Argon2&lt;/li&gt;
&lt;li&gt;Always use salting for password hashing&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Hashing mistakes are still one of the most common security issues in real-world applications.&lt;/p&gt;

&lt;p&gt;Fixing them early saves a lot of pain later.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Zohaib Hassan&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;OnlineFreeTools.online — free browser-based tools for developers&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your JWT Tokens Are Not as Safe as You Think — Here's Why</title>
      <dc:creator>zohaib hassan</dc:creator>
      <pubDate>Thu, 04 Jun 2026 06:51:14 +0000</pubDate>
      <link>https://dev.to/zohaib_hassan_1fdedd55e7d/your-jwt-tokens-are-not-as-safe-as-you-think-heres-why-13hc</link>
      <guid>https://dev.to/zohaib_hassan_1fdedd55e7d/your-jwt-tokens-are-not-as-safe-as-you-think-heres-why-13hc</guid>
      <description>&lt;p&gt;&lt;a href="https://onlinefreetools.online/blog/what-is-jwt-token" rel="noopener noreferrer"&gt;What is a JWT Token?&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Stop Pasting JWT Tokens Into Random Online Decoders
&lt;/h1&gt;

&lt;p&gt;I see developers paste JWT tokens into random online decoders every day without thinking twice.&lt;/p&gt;

&lt;p&gt;Here's the problem: &lt;strong&gt;JWT tokens often contain sensitive information&lt;/strong&gt;, and pasting them into unknown websites can become a serious security risk.&lt;/p&gt;

&lt;p&gt;Let's break down what JWT tokens actually are, what's inside them, and how to decode them safely.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Is a JWT Token?
&lt;/h1&gt;

&lt;p&gt;JWT stands for &lt;strong&gt;JSON Web Token&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It's a compact, URL-safe format used to securely transmit information between parties. JWTs are commonly used in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;Authentication systems&lt;/li&gt;
&lt;li&gt;OAuth flows&lt;/li&gt;
&lt;li&gt;Single Sign-On (SSO)&lt;/li&gt;
&lt;li&gt;Mobile applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A typical JWT 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;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlpvaGFpYiIsImlhdCI6MTUxNjIzOTAyMn0
.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A JWT consists of &lt;strong&gt;three parts&lt;/strong&gt;, separated by dots (&lt;code&gt;.&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Header&lt;/li&gt;
&lt;li&gt;Payload&lt;/li&gt;
&lt;li&gt;Signature&lt;/li&gt;
&lt;/ol&gt;




&lt;h1&gt;
  
  
  Understanding the JWT Structure
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Header
&lt;/h2&gt;

&lt;p&gt;The header contains metadata about the token, including the signing algorithm.&lt;/p&gt;

&lt;p&gt;Decoded header:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"alg"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"HS256"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"typ"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"JWT"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;alg&lt;/strong&gt; → Signing algorithm&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;typ&lt;/strong&gt; → Token type&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Payload
&lt;/h2&gt;

&lt;p&gt;The payload contains the actual claims (data).&lt;/p&gt;

&lt;p&gt;Decoded payload:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sub"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1234567890"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Zohaib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"iat"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1516239022&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Common payload fields include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User ID&lt;/li&gt;
&lt;li&gt;Username&lt;/li&gt;
&lt;li&gt;Email address&lt;/li&gt;
&lt;li&gt;Roles and permissions&lt;/li&gt;
&lt;li&gt;Issued time (&lt;code&gt;iat&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Expiration time (&lt;code&gt;exp&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where most developers accidentally expose sensitive information.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Signature
&lt;/h2&gt;

&lt;p&gt;The signature ensures the token hasn't been modified.&lt;/p&gt;

&lt;p&gt;A simplified signing process looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  secret
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The signature can be verified but cannot be decoded into readable JSON.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Security Risk Nobody Talks About
&lt;/h1&gt;

&lt;p&gt;Many developers assume JWTs are encrypted.&lt;/p&gt;

&lt;p&gt;They're not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JWT payloads are encoded, not encrypted.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Anyone who obtains your token can decode the header and payload instantly.&lt;/p&gt;

&lt;p&gt;That's why you should never:&lt;/p&gt;

&lt;p&gt;❌ Store passwords in JWT payloads&lt;/p&gt;

&lt;p&gt;❌ Store API secrets in JWT payloads&lt;/p&gt;

&lt;p&gt;❌ Paste production tokens into unknown online tools&lt;/p&gt;

&lt;p&gt;❌ Log JWTs in production environments&lt;/p&gt;

&lt;p&gt;❌ Share JWTs in screenshots or support tickets&lt;/p&gt;

&lt;p&gt;Remember:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If someone has your JWT, they can read everything inside the payload.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  How to Decode JWTs Safely
&lt;/h1&gt;

&lt;p&gt;The safest option is using a decoder that runs entirely inside your browser.&lt;/p&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No server requests&lt;/li&gt;
&lt;li&gt;No token uploads&lt;/li&gt;
&lt;li&gt;No data storage&lt;/li&gt;
&lt;li&gt;No third-party processing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The decoding happens locally using JavaScript.&lt;/p&gt;

&lt;p&gt;Your token never leaves your machine.&lt;/p&gt;




&lt;h1&gt;
  
  
  JWT vs Session Authentication
&lt;/h1&gt;

&lt;p&gt;Developers often ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Should I use JWTs or Sessions?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's a quick comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;JWT&lt;/th&gt;
&lt;th&gt;Sessions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stateless&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Server Storage Needed&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Easy Token Revocation&lt;/td&gt;
&lt;td&gt;❌ Harder&lt;/td&gt;
&lt;td&gt;✅ Easier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Horizontal Scaling&lt;/td&gt;
&lt;td&gt;✅ Excellent&lt;/td&gt;
&lt;td&gt;⚠️ More Complex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mobile/API Friendly&lt;/td&gt;
&lt;td&gt;✅ Excellent&lt;/td&gt;
&lt;td&gt;⚠️ Less Ideal&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  When JWTs Make Sense
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;Microservices&lt;/li&gt;
&lt;li&gt;Mobile apps&lt;/li&gt;
&lt;li&gt;Distributed systems&lt;/li&gt;
&lt;li&gt;Third-party integrations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When Sessions Make Sense
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Traditional server-rendered applications&lt;/li&gt;
&lt;li&gt;Systems requiring immediate logout/revocation&lt;/li&gt;
&lt;li&gt;Simpler authentication architectures&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  JWT Best Practices
&lt;/h1&gt;

&lt;p&gt;If you're using JWT authentication in production:&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep Payloads Minimal
&lt;/h3&gt;

&lt;p&gt;Store only the information you truly need.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Short Expiration Times
&lt;/h3&gt;

&lt;p&gt;Avoid long-lived access tokens.&lt;/p&gt;

&lt;h3&gt;
  
  
  Always Use HTTPS
&lt;/h3&gt;

&lt;p&gt;JWTs should never travel over unsecured connections.&lt;/p&gt;

&lt;h3&gt;
  
  
  Implement Refresh Tokens
&lt;/h3&gt;

&lt;p&gt;Use refresh tokens instead of extremely long expiration periods.&lt;/p&gt;

&lt;h3&gt;
  
  
  Never Store Secrets in Payloads
&lt;/h3&gt;

&lt;p&gt;JWT payloads are visible to anyone holding the token.&lt;/p&gt;

&lt;h3&gt;
  
  
  Validate Signatures
&lt;/h3&gt;

&lt;p&gt;Decoding a JWT does not verify it.&lt;/p&gt;

&lt;p&gt;Always validate the signature on the server side.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;JWTs are one of the most widely used authentication mechanisms today, but they're also widely misunderstood.&lt;/p&gt;

&lt;p&gt;Remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JWTs are &lt;strong&gt;encoded, not encrypted&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Anyone with the token can read the payload&lt;/li&gt;
&lt;li&gt;Never store sensitive data inside JWT claims&lt;/li&gt;
&lt;li&gt;Avoid pasting production tokens into unknown decoder websites&lt;/li&gt;
&lt;li&gt;Always verify JWT signatures on the server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding these basics can prevent accidental data exposure and improve the security of your applications.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What security mistakes have you seen developers make with JWTs?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Share your experiences in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Zohaib Hassan&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Building OnlineFreeTools.online — a collection of free browser-based developer and productivity tools.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>10 Free Online Tools Every Developer Should Bookmark</title>
      <dc:creator>zohaib hassan</dc:creator>
      <pubDate>Thu, 04 Jun 2026 06:43:08 +0000</pubDate>
      <link>https://dev.to/zohaib_hassan_1fdedd55e7d/10-free-online-tools-every-developer-should-bookmark-3m1j</link>
      <guid>https://dev.to/zohaib_hassan_1fdedd55e7d/10-free-online-tools-every-developer-should-bookmark-3m1j</guid>
      <description>&lt;p&gt;&lt;a href="https://onlinefreetools.online/category/developer" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a developer, I spend a lot of time switching between tools — formatting JSON, decoding JWT tokens, testing regex patterns, checking hashes. Most of the time I end up on sketchy sites plastered with ads, or I paste sensitive data into unknown third-party services.&lt;br&gt;
So I built OnlineFreeTools.online — a collection of 30+ free browser-based tools that run entirely in your browser. No signup. No ads. No data sent to any server.&lt;br&gt;
Here are the 10 tools I use almost every single day:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. JSON Formatter &amp;amp; Validator
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/json-formatter&lt;br&gt;
Paste messy JSON and instantly get a clean, syntax-highlighted, formatted version. You can also minify JSON for production. Great for debugging API responses.&lt;br&gt;
json// Before&lt;br&gt;
{"name":"Zohaib","role":"developer","skills":["Next.js","React","TypeScript"]}&lt;/p&gt;

&lt;p&gt;// After (formatted)&lt;br&gt;
{&lt;br&gt;
  "name": "Zohaib",&lt;br&gt;
  "role": "developer",&lt;br&gt;
  "skills": [&lt;br&gt;
    "Next.js",&lt;br&gt;
    "React",&lt;br&gt;
    "TypeScript"&lt;br&gt;
  ]&lt;br&gt;
}&lt;/p&gt;

&lt;h2&gt;
  
  
  2. JWT Decoder
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/jwt-decoder&lt;br&gt;
Paste any JWT token and instantly see the decoded header, payload, and signature. Extremely useful when debugging authentication issues. The tool runs entirely in your browser — your tokens never leave your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Regex Tester
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/regex-tester&lt;br&gt;
Test regex patterns live with real-time match highlighting. Supports flags like global, case-insensitive, and multiline. Perfect for validating email formats, phone numbers, and URLs.&lt;br&gt;
Common patterns I use daily:&lt;/p&gt;

&lt;p&gt;Email: ^[^\s@]+@[^\s@]+.[^\s@]+$&lt;br&gt;
URL: https?:\/\/(www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}&lt;br&gt;
Phone (Pakistan): ^(+92|0)?[0-9]{10}$&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Base64 Encoder/Decoder
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/base64-encoder&lt;br&gt;
Encode any string or decode Base64 back to plain text. I use this constantly when working with APIs that send Base64-encoded data or when embedding images in HTML/CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Hash Generator
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/hash-generator&lt;br&gt;
Generate MD5, SHA1, SHA256, and SHA512 hashes instantly. Useful for verifying file integrity, checking passwords, or understanding cryptographic concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Image Compressor
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/image-compressor&lt;br&gt;
Compress JPEG and PNG images directly in the browser without uploading to any server. I reduced my site's images by 80% using this before deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. URL Encoder/Decoder
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/url-encoder&lt;br&gt;
Instantly encode special characters for URLs or decode percent-encoded URLs. Essential when building query strings or debugging URL issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. SQL Formatter
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/sql-formatter&lt;br&gt;
Paste messy SQL and get a clean, readable, properly indented query back. Your teammates will thank you in code reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Color Converter
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/color-converter&lt;br&gt;
Convert between HEX, RGB, and HSL color formats instantly. No more manually calculating color values when switching between design tools and code.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Code Minifier
&lt;/h2&gt;

&lt;p&gt;Link: onlinefreetools.online/tools/code-minifier&lt;br&gt;
Minify CSS, JavaScript, and HTML in one click. Great for reducing file sizes before deployment without a full build pipeline.&lt;/p&gt;

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

&lt;p&gt;I got tired of pasting sensitive code and tokens into random websites with unclear privacy policies. Every tool on OnlineFreeTools.online processes data locally in your browser — nothing is sent to any server.&lt;br&gt;
Bookmark it and try it out. It's completely free, no account needed.&lt;/p&gt;

&lt;p&gt;Built by Zohaib, a web developer from Pakistan. Check out all 30+ tools at &lt;a href="https://onlinefreetools.online" rel="noopener noreferrer"&gt;onlinefreetools&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
