1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
---
layout: default
title: Overview
redirect_from:
- /2.0/
- /2.1/
- /2.2/
- /2.3/
- /2.4/
- /2.5/
- /2.6/
- /2.7/
---
<img class="banner" src="/images/commonmark-banner.png" alt="CommonMark for PHP" />
# Overview
[](https://twitter.com/colinodell)
[](https://packagist.org/packages/league/commonmark)
[](https://packagist.org/packages/league/commonmark)
[](https://github.com/thephpleague/commonmark/blob/HEAD/LICENSE)
[](https://github.com/thephpleague/commonmark/actions?query=workflow%3ATests+branch%3Amain)
[](https://scrutinizer-ci.com/g/thephpleague/commonmark/code-structure)
[](https://scrutinizer-ci.com/g/thephpleague/commonmark)
{{ site.data.project.highlights.description }}
## Installation
This library can be installed via Composer:
```bash
composer require league/commonmark
```
See the [installation](/2.x/installation/) section for more details.
## Basic Usage
Simply instantiate the converter and start converting some Markdown to HTML!
```php
use League\CommonMark\CommonMarkConverter;
$converter = new CommonMarkConverter();
echo $converter->convert('# Hello, World!')->getContent();
// <h1>Hello, World!</h1>
```
<i class="fa fa-exclamation-triangle"></i>
**Important:** See the [basic usage](/2.x/basic-usage/) and [security](/2.x/security/) sections for important details.
|