WebTools

307 Useful Tools & Utilities to make life easier.

IDN/Punycode Phishing Detector

Identify domain homograph attacks using Punycode and Unicode characters.

Paste the suspicious domain here to reveal its true Unicode form.
Analysis Results
Decoded Unicode Domain (Visual Representation)

Tip: Always check the address bar in your browser. Most modern browsers will display the xn-- version if the domain is considered suspicious.

Demystifying the IDN Punycode Detector

The IDN Punycode Detector is a specialized security and debugging utility designed to expose the true visual representation of Internationalized Domain Names (IDNs). As the web evolved to support global languages, the Domain Name System (DNS)—which historically only understood ASCII characters—needed a bridge. That bridge is Punycode, an encoding scheme that translates Unicode characters into a restricted ASCII character set (always beginning with the xn-- prefix).

While IDNs are fantastic for accessibility, they have introduced a severe security vulnerability known as the Internationalized Domain Name (IDN) homograph attack. Attackers register domains using characters from different scripts (like Cyrillic or Greek) that look identical to standard Latin characters (e.g., replacing the Latin "a" with the Cyrillic "а"). This tool programmatically strips away the ASCII mask to reveal exactly which characters are hiding inside a domain.

How the Analysis Engine Works

The tool doesn't just decode the string; it runs a multi-step heuristic analysis on the domain to determine its safety profile. Here is exactly what happens when you hit analyze:

  • Data Normalization: The engine first cleans the input. It forces the string to lowercase and strips out whitespace. If you paste a full URL, it uses regex (/^(https?://)/) to remove the protocol and splits the string at the first forward slash (/) to isolate the root domain.
  • Punycode Translation: The core decoding relies on a dedicated Punycode-to-Unicode conversion algorithm. If the output string differs from the input string, the tool officially flags the domain as containing Punycode.
  • Mixed Script Detection: This is the most critical security check. The tool runs two concurrent regular expressions on the decoded Unicode string: one looking for standard Latin alphanumeric characters (/[a-z0-9]/) and another looking for non-ASCII characters (/[^\u0000-\u007F]/). If both are present, the tool triggers a "High Risk: Mixed Scripts Detected" alert. Legitimate IDNs typically stick to a single language script. Mixing Latin with foreign scripts is a massive red flag for spoofing.
  • Character Isolation and Categorization: The engine iterates through every single character in the decoded domain, checking its internal character code. Any character with a code greater than 127 is pushed into a "Suspicious Characters" array. The tool then maps the Unicode hex value (e.g., U+0435) against known character blocks to identify its origin script.

Supported Unicode Categories

When non-ASCII characters are detected, the system maps their hexadecimal values to the following specific script blocks:

Hexadecimal Range Script / Category
0x0400 - 0x04FFCyrillic
0x0370 - 0x03FFGreek
0x0590 - 0x05FFHebrew
0x0600 - 0x06FFArabic
0x3040 - 0x309FHiragana
0x30A0 - 0x30FFKatakana
0x4E00 - 0x9FFFCJK Unified Ideographs

Worked Example: Deconstructing a Spoofed Domain

Let's look at how the tool processes a classic homograph attack. Imagine a user receives an email with the link https://xn--googl-0ka.com/login.

  1. Input: https://xn--googl-0ka.com/login
  2. Normalization: The tool strips the https:// and drops the /login path, leaving exactly xn--googl-0ka.com.
  3. Decoding: The Punycode algorithm translates the string into googlе.com. Visually, it looks like Google, but the last "е" is actually a Cyrillic character.
  4. Script Analysis: The engine finds standard Latin letters (g, o, l, c, m) and one non-ASCII character. Because both exist, the High Risk mixed script alert is fired.
  5. Character Isolation: The system isolates the fake "е". It reads its character code (1077), converts it to hex (0435), and formats it as U+0435. Because 0435 falls between 0x0400 and 0x04FF, the tool outputs a table row showing the character, its hex code, and identifies it as Cyrillic.

Frequently Asked Questions

No, you can paste full URLs directly into the tool. The underlying logic automatically searches for and removes HTTP/HTTPS protocols and splits the string at the first slash to discard paths, queries, or fragments, ensuring only the domain is processed by the Punycode decoder.

The warning is triggered if the decoded domain contains at least one standard Latin alphanumeric character (a-z, 0-9) and at least one character outside the standard ASCII range (character code > 127). Mixing standard Latin letters with foreign scripts is the primary mechanism behind homograph phishing attacks.

The tool will still process the domain. When the decoding engine realizes the original input matches the processed output, it will simply display a green "Standard Latin Domain" badge, confirming that no hidden Unicode characters are present.

The tool categorizes characters by checking if their hexadecimal Unicode value falls within specific predefined ranges (like Cyrillic, Greek, Hebrew, Arabic, Hiragana, Katakana, and CJK Ideographs). If a character code > 127 is found but its hex value doesn't fall within these specific monitored blocks, it falls back to the default "Other Unicode" classification.

Contact

Missing something?

Feel free to request missing tools or give some feedback using our contact form.

Contact Us