PHPackages                             pixlmint/parsedown - 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. pixlmint/parsedown

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

pixlmint/parsedown
==================

Parser for Markdown.

1.6(5mo ago)0259↓100%MITPHPPHP &gt;=7.1CI failing

Since Jun 30Pushed 5mo agoCompare

[ Source](https://github.com/pixlmint/parsedown)[ Packagist](https://packagist.org/packages/pixlmint/parsedown)[ Docs](http://parsedown.org)[ RSS](/packages/pixlmint-parsedown/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (8)Used By (0)

Parsedown
=========

[](#parsedown)

**my fork of the [official parsedown package](https://github.com/erusev/parsedown) by erusev, with my own small tweaks**

[![Total Downloads](https://camo.githubusercontent.com/d08c3025fb8ada49ca6fb806cd4e8dec57241d642ad8ed1ce45c221d3fcdd350/68747470733a2f2f706f7365722e707567782e6f72672f7069786c6d696e742f7061727365646f776e2f642f746f74616c2e737667)](https://packagist.org/packages/pixlmint/parsedown)[![Version](https://camo.githubusercontent.com/f3d7a4f8c25fd5dd123aac7e221356af0d382c0dc4e21df8873ad334850480f4/68747470733a2f2f706f7365722e707567782e6f72672f7069786c6d696e742f7061727365646f776e2f762f737461626c652e737667)](https://packagist.org/packages/pixlmint/parsedown)[![License](https://camo.githubusercontent.com/89b22e6946cda4074d857bf9fb6814dcd7f88fbaccab834788d4a3cd26e470e8/68747470733a2f2f706f7365722e707567782e6f72672f7069786c6d696e742f7061727365646f776e2f6c6963656e73652e737667)](https://packagist.org/packages/pixlmint/parsedown)

Better Markdown Parser in PHP — [demo](https://parsedown.org/demo)

Features
--------

[](#features)

- One file
- No dependencies
- [Super fast](http://parsedown.org/speed)
- Extensible
- [GitHub flavored](https://github.github.com/gfm)
- [Tested](http://parsedown.org/tests/) in 5.3 to 7.3
- [Markdown Extra extension](https://github.com/erusev/parsedown-extra)

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

[](#installation)

Install the [composer package](https://packagist.org/packages/erusev/parsedown "The Parsedown package on packagist.org"):

```
composer require erusev/parsedown
```

Or download the [latest release](https://github.com/erusev/parsedown/releases/latest "The latest release of Parsedown") and include `Parsedown.php`

Example
-------

[](#example)

```
use PixlMint\Parsedown\Parsedown;

$Parsedown = new Parsedown();

echo $Parsedown->text('Hello _Parsedown_!'); # prints: Hello Parsedown!
```

You can also parse inline markdown only:

```
echo $Parsedown->line('Hello _Parsedown_!'); # prints: Hello Parsedown!
```

More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI).

Security
--------

[](#security)

Parsedown is capable of escaping user-input within the HTML that it generates. Additionally Parsedown will apply sanitisation to additional scripting vectors (such as scripting link destinations) that are introduced by the markdown syntax itself.

To tell Parsedown that it is processing untrusted user-input, use the following:

```
$Parsedown->setSafeMode(true);
```

If instead, you wish to allow HTML within untrusted user-input, but still want output to be free from XSS it is recommended that you make use of a HTML sanitiser that allows HTML tags to be whitelisted, like [HTML Purifier](http://htmlpurifier.org/).

In both cases you should strongly consider employing defence-in-depth measures, like [deploying a Content-Security-Policy](https://scotthelme.co.uk/content-security-policy-an-introduction/) (a browser security feature) so that your page is likely to be safe even if an attacker finds a vulnerability in one of the first lines of defence above.

Safe mode does not necessarily yield safe results when using extensions to Parsedown. Extensions should be evaluated on their own to determine their specific safety against XSS.

Escaping HTML
-------------

[](#escaping-html)

> WARNING: This method is not safe from XSS!

If you wish to escape HTML in trusted input, you can use the following:

```
$Parsedown->setMarkupEscaped(true);
```

Beware that this still allows users to insert unsafe scripting vectors, ex: `[xss](javascript:alert%281%29)`.

Questions
---------

[](#questions)

**How does Parsedown work?**

It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line starts with a `-` then perhaps it belongs to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines).

We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages.

**Is it compliant with CommonMark?**

It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.

**Who uses it?**

[Laravel Framework](https://laravel.com/), [Bolt CMS](http://bolt.cm/), [Grav CMS](http://getgrav.org/), [Herbie CMS](http://www.getherbie.org/), [Kirby CMS](http://getkirby.com/), [October CMS](http://octobercms.com/), [Pico CMS](http://picocms.org), [Statamic CMS](http://www.statamic.com/), [phpDocumentor](http://www.phpdoc.org/), [RaspberryPi.org](http://www.raspberrypi.org/), [Symfony Demo](https://github.com/symfony/demo) and [more](https://packagist.org/packages/erusev/parsedown/dependents).

**How can I help?**

Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).

**What else should I know?**

I also make [Nota](https://nota.md/) — a notes app designed for local Markdown files.

###  Health Score

38

↑

LowBetter than 86% of packages

Maintenance73

Regular maintenance activity

Popularity13

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.5% 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 ~140 days

Recently: every ~175 days

Total

7

Last Release

154d ago

PHP version history (2 changes)1.0PHP &gt;=5.3.0

1.3PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ab982e783c266a8f22aa08594b7b8d336c41c052507ac358acbf985faccbcf7?d=identicon)[Kristophersson](/maintainers/Kristophersson)

---

Top Contributors

[![erusev](https://avatars.githubusercontent.com/u/184170?v=4)](https://github.com/erusev "erusev (511 commits)")[![aidantwoods](https://avatars.githubusercontent.com/u/3288888?v=4)](https://github.com/aidantwoods "aidantwoods (235 commits)")[![PhrozenByte](https://avatars.githubusercontent.com/u/920356?v=4)](https://github.com/PhrozenByte "PhrozenByte (28 commits)")[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (20 commits)")[![pixlmint](https://avatars.githubusercontent.com/u/40316753?v=4)](https://github.com/pixlmint "pixlmint (14 commits)")[![naNuke](https://avatars.githubusercontent.com/u/4591126?v=4)](https://github.com/naNuke "naNuke (7 commits)")[![wkpark](https://avatars.githubusercontent.com/u/232347?v=4)](https://github.com/wkpark "wkpark (6 commits)")[![rhukster](https://avatars.githubusercontent.com/u/1084697?v=4)](https://github.com/rhukster "rhukster (6 commits)")[![Daniel-KM](https://avatars.githubusercontent.com/u/2138485?v=4)](https://github.com/Daniel-KM "Daniel-KM (4 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (4 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (4 commits)")[![xPaw](https://avatars.githubusercontent.com/u/613331?v=4)](https://github.com/xPaw "xPaw (3 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (3 commits)")[![jmsv](https://avatars.githubusercontent.com/u/14852491?v=4)](https://github.com/jmsv "jmsv (3 commits)")[![KaneCohen](https://avatars.githubusercontent.com/u/578455?v=4)](https://github.com/KaneCohen "KaneCohen (3 commits)")[![Ayesh](https://avatars.githubusercontent.com/u/811553?v=4)](https://github.com/Ayesh "Ayesh (2 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (2 commits)")[![luizbills](https://avatars.githubusercontent.com/u/1798830?v=4)](https://github.com/luizbills "luizbills (2 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (2 commits)")[![HelpingHand1](https://avatars.githubusercontent.com/u/197991695?v=4)](https://github.com/HelpingHand1 "HelpingHand1 (2 commits)")

---

Tags

parsermarkdown

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pixlmint-parsedown/health.svg)

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

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k150.2M630](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k393.7M556](/packages/league-commonmark)[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.6M172](/packages/erusev-parsedown-extra)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5933.2k](/packages/tovic-parsedown-extra-plugin)[taufik-nurrohman/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5931.8k](/packages/taufik-nurrohman-parsedown-extra-plugin)[parsedown/parsedown

Parser for Markdown.

22110.4k1](/packages/parsedown-parsedown)

PHPackages © 2026

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