PHPackages                             dg/texy - 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. dg/texy

Abandoned → [texy/texy](/?search=texy%2Ftexy)Library[Parsing &amp; Serialization](/categories/parsing)

dg/texy
=======

Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated against spambots), national typographic single and double quotation marks, ellipses, em dashes, dimension sign, nonbreakable spaces (e.g. in phone numbers), acronyms, arrows and many others. Texy code can optionally contain HTML tags.

v3.2.8(5mo ago)159135.1k↑185.7%25[1 PRs](https://github.com/dg/texy/pulls)3BSD-3-ClauseHTMLPHP 8.1 - 8.5CI passing

Since Jul 15Pushed 2w ago18 watchersCompare

[ Source](https://github.com/dg/texy)[ Packagist](https://packagist.org/packages/dg/texy)[ Docs](https://texy.nette.org)[ RSS](/packages/dg-texy/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (40)Used By (3)

Texy! [![Buy me a coffee](https://camo.githubusercontent.com/e18e9ec4911f4eaea35b05804873a35ba115acaf364ccc4783343028530186a4/68747470733a2f2f66696c65732e6e657474652e6f72672f696d616765732f636f6666656531732e706e67)](https://nette.org/make-donation?to=texy)
===============================================================================================================================================================================================================================================================

[](#texy---)

[![Downloads this Month](https://camo.githubusercontent.com/ca141ad39c43f91456550af3de4cc241b2df28e44e9eec033b2b7708c9b26f97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f746578792f746578792e737667)](https://packagist.org/packages/texy/texy)[![Tests](https://github.com/dg/texy/workflows/Tests/badge.svg?branch=master)](https://github.com/dg/texy/actions)[![Coverage Status](https://camo.githubusercontent.com/1f0a6e5b86fb913f8af8f15ea8ccc085dda7b168cdc8dc541b95ac97e50933a2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f64672f746578792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/dg/texy?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/9fc7471118efc1c11467ba7dc54eaf97ccecb9e15ba6f0c7a1bcfe4990e40ec3/68747470733a2f2f706f7365722e707567782e6f72672f64672f746578792f762f737461626c65)](https://github.com/dg/texy/releases)[![License](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://github.com/dg/texy/blob/master/license.md)

Texy is a text-to-HTML engine for lightweight markup languages, written in PHP. It turns human-readable plain text into structurally valid HTML – complete with images, links, nested lists, and tables – no knowledge of HTML required.

Above all, Texy is an engine. It ships with its own rich, easy-to-read markup, but nothing about that syntax is set in stone: every rule can be switched on or off, redefined, or extended with your own. You can reshape Texy to speak a different dialect entirely – even Markdown.

And Texy is a typographer at heart. It swaps straight quotes for typographically correct ones, hyphens for dashes, the letter x for the dimension sign, and applies many more refinements so your text reads like it was professionally typeset.

Install Texy via Composer:

```
composer require texy/texy

```

Texy requires PHP 8.2 or higher.

Usage
-----

[](#usage)

```
$texy = new Texy;
$html = $texy->process($text);

```

For untrusted input, always enable safe mode, which restricts the output to a safe subset of HTML:

```
Texy\Configurator::safeMode($texy);
$html = $texy->process($text);

```

Documentation and Examples
--------------------------

[](#documentation-and-examples)

The full manual is on the homepage . The [docs/](docs/)directory holds the reference for using and extending Texy:

- **[Syntax reference](docs/syntax.md)** – complete reference of the Texy markup language, including syntaxes that are disabled by default
- **[Configuration](docs/configuration.md)** – all configuration options, the `Configurator` presets, and security (safe mode)
- **[Custom handlers](docs/custom-handlers.md)** – changing the behavior of existing constructs via renderer handlers and AST passes
- **[Custom syntax](docs/custom-syntax.md)** – adding brand-new markup constructs
- **[Upgrading](docs/upgrading.md)** – migration guide from Texy 3

The **[examples/](examples/)** directory contains ready-to-run demos.

[Support Me](https://github.com/sponsors/dg)
--------------------------------------------

[](#support-me)

Do you like Texy? Are you looking forward to the new features?

[![Buy me a coffee](https://camo.githubusercontent.com/afa7c20ccaac10ac4f1f51669bafb212856b932e0c8b276cb290336cf08624b8/68747470733a2f2f66696c65732e6e657474652e6f72672f69636f6e732f646f6e6174696f6e2d332e737667)](https://github.com/sponsors/dg)

Thank you!

###  Health Score

67

—

FairBetter than 99% of packages

Maintenance85

Actively maintained with recent releases

Popularity46

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.8% 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 ~128 days

Recently: every ~110 days

Total

38

Last Release

35d ago

Major Versions

v2.9.2 → v3.0.02019-02-13

v2.x-dev → v3.1.02020-01-14

PHP version history (7 changes)v2.3PHP &gt;=5.0.0

v2.4PHP &gt;=5.2.0

v2.8PHP &gt;=5.4.4

v3.0.0PHP &gt;=7.1

v3.2.0PHP 8.1 - 8.3

v3.2.3PHP 8.1 - 8.4

v3.2.6PHP 8.1 - 8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f266513a3ca97500ec3d85d562b9279c7a6346358fe2b8d90390ece717a027?d=identicon)[david@grudl.com](/maintainers/david@grudl.com)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (597 commits)")[![feldsam](https://avatars.githubusercontent.com/u/951648?v=4)](https://github.com/feldsam "feldsam (1 commits)")[![hrach](https://avatars.githubusercontent.com/u/284263?v=4)](https://github.com/hrach "hrach (1 commits)")[![janmarek](https://avatars.githubusercontent.com/u/150257?v=4)](https://github.com/janmarek "janmarek (1 commits)")[![Katoga](https://avatars.githubusercontent.com/u/10478383?v=4)](https://github.com/Katoga "Katoga (1 commits)")[![PetrHudik](https://avatars.githubusercontent.com/u/560450?v=4)](https://github.com/PetrHudik "PetrHudik (1 commits)")[![spaze](https://avatars.githubusercontent.com/u/1966648?v=4)](https://github.com/spaze "spaze (1 commits)")[![uestla](https://avatars.githubusercontent.com/u/373888?v=4)](https://github.com/uestla "uestla (1 commits)")

---

Tags

markdownphptexyhtmlmarkdowntextwikitexyplain textmarkup languagetextile

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dg-texy/health.svg)

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

###  Alternatives

[texy/texy

Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated against spambots), national typographic single and double quotation marks, ellipses, em dashes, dimension sign, nonbreakable spaces (e.g. in phone numbers), acronyms, arrows and many others. Texy code can optionally contain HTML tags.

159870.0k15](/packages/texy-texy)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k33.5M370](/packages/league-html-to-markdown)[interaction-design-foundation/nova-html-card

A Laravel Nova card to display arbitrary HTML content

68899.8k4](/packages/interaction-design-foundation-nova-html-card)[pixel418/markdownify

The HTML to Markdown converter for PHP

196897.8k8](/packages/pixel418-markdownify)[3f/converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

29155.1k](/packages/3f-converter)[jbroadway/slimdown

A simple regex-based Markdown parser.

348.0k](/packages/jbroadway-slimdown)

PHPackages © 2026

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