Skip to content

Encoding Transformations · passage 4 of 5

Punycode

2 code blocks · Encoding Transformations/README.md

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page.

Open this passage on GitHub

Punycode is a way to represent Unicode characters (including non-ASCII letters, symbols, and scripts) using only the limited set of ASCII characters (letters, digits, and hyphens). It's mainly used in the Domain Name System (DNS), which traditionally supports only ASCII. Punycode allows internationalized domain names (IDNs), so that domain names can include characters from many languages by converting them into a safe ASCII form. | Visible in Browser (IDN support) | Actual ASCII (Punycode) | | -------------------------------- | ----------------------- | | раypal.com | xn--ypal-43d9g.com | | paypal.com | paypal.com | In MySQL, similar character are treated as equal. This behavior can be abused in Password Reset, Forgot Password, and OAuth Provider sections.

SELECT 'a' = 'ᵃ';
+-------------+
| 'a' = 'ᵃ'   |
+-------------+
|           1 |
+-------------+

This trick works the SQL query uses `COLLATE utf8mb4_0900_as_cs`.

SELECT 'a' = 'ᵃ' COLLATE utf8mb4_0900_as_cs;
+----------------------------------------+
| 'a' = 'ᵃ' COLLATE utf8mb4_0900_as_cs   |
+----------------------------------------+
|                                      0 |
+----------------------------------------+

Source: Encoding Transformations/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.

Every one of the 5 is a mark on the map. Named now: 1 to 5, reading order first.

  1. Encoding and Transformations§ 1text · README.md
  2. Unicode§ 2text · README.md
  3. Unicode Normalization§ 31 code block · README.md
  4. Punycode§ 42 code blocks · README.md
  5. Base64§ 51 code block · README.md

Zoom in on the map and the dots under the middle of it are named where they are.

Data as of 2026-11-14. CVE List through 2026-11-14 · EPSS of 2026-11-13 · CISA KEV checked 2026-11-14. Source: PayloadsAllTheThings by Swissky and contributors, MIT License. For authorised testing only. Use this via MCP

Updated AboutDevelopersSign in