PHPackages                             qdenka/punycode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. qdenka/punycode

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

qdenka/punycode
===============

A simple PHP library for encoding and decoding URLs to and from Punycode.

1.3.0(3mo ago)24.7k↑30%PHPPHP &gt;=7.4CI passing

Since Jul 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/QDenka/Punycode)[ Packagist](https://packagist.org/packages/qdenka/punycode)[ RSS](/packages/qdenka-punycode/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (9)Used By (0)

Punycode Converter
==================

[](#punycode-converter)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/qdenka/Punycode/blob/main/LICENSE)[![Build Status](https://camo.githubusercontent.com/35228694c50e710c026028424c004f453a0a3d11a0d57e1220bc1426984b3493/68747470733a2f2f7472617669732d63692e636f6d2f7164656e6b612f70756e79636f64652e7376673f6272616e63683d6d61696e)](https://travis-ci.com/your-username/your-library)[![Coverage Status](https://camo.githubusercontent.com/efe20b8e1495351da59a02e5cf780107767654852f47492c7a7f396234e1dae0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7164656e6b612f70756e79636f64652f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/your-username/your-library?branch=main)

Punycode Converter is a PHP library that provides functions to encode and decode URLs using Punycode.

Installation
------------

[](#installation)

You can install the library via Composer. Run the following command:

```
composer require qdenka/punycode
```

Usage Punycode Converter
------------------------

[](#usage-punycode-converter)

```
use Qdenka\Punycode\Converter;

// Encode a URL to Punycode
$encodedUrl = Converter::encode('http://www.üñïçø∂é.com/привет#мир');

// Decode a Punycode URL back to its original form
$decodedUrl = Converter::decode('http://xn--tda.com/');

// Encode an array of URLs to Punycode
$urls = ['http://www.üñïçø.com/testcase', 'ßlåh.com'];
$encodedUrls = Converter::encodeFromArray($urls);

// Decode an array of Punycode URLs back to their original forms
$punycodeUrls = ['xn--tda.com', 'http://www.example.com/url1'];
$decodedUrls = Converter::decodeFromArray($punycodeUrls);
```

Usage Punycode Identifier
-------------------------

[](#usage-punycode-identifier)

```
use Qdenka\Punycode\Identifier;

// Check if a URL is encoded IDN
$isPunycode = Identifier::isPunycode('http://xn--tda.com/');

// Check if a URL is Ascii
$isNotPunycode = Identifier::isUnicode('http://www.üñïçø.com/');
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance81

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~238 days

Total

5

Last Release

100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3339fb58d7742b5f4ce6a647b09c74739d28b9ecfc85ffb5de6d2f04b6985b82?d=identicon)[qdenka](/maintainers/qdenka)

---

Top Contributors

[![QDenka](https://avatars.githubusercontent.com/u/77678360?v=4)](https://github.com/QDenka "QDenka (17 commits)")

---

Tags

converterdomainidnphppunycode

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/qdenka-punycode/health.svg)

```
[![Health](https://phpackages.com/badges/qdenka-punycode/health.svg)](https://phpackages.com/packages/qdenka-punycode)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
