---
title: "Tiptap for PHP utility"
description: "Use the Tiptap PHP package to convert Tiptap JSON to HTML, sanitize content, or modify it. More in the docs!"
canonical_url: "https://tiptap.dev/docs/editor/api/utilities/tiptap-for-php"
---

# Tiptap for PHP utility

Use the Tiptap PHP package to convert Tiptap JSON to HTML, sanitize content, or modify it. More in the docs!

A PHP package to work with [Tiptap](https://tiptap.dev/) content. You can transform Tiptap-compatible JSON to HTML, and the other way around, sanitize your content, or just modify it.

## Install

You can install the package via composer:

```bash
composer require ueberdosis/tiptap-php
```

## Using the Tiptap PHP utility

The PHP package mimics large parts of the JavaScript package. If you know your way around Tiptap, the PHP syntax will feel familiar to you. Here is an easy example:

```php
(new Tiptap\Editor)
    ->setContent('<p>Example Text</p>')
    ->getDocument();

// Returns:
// ['type' => 'doc', 'content' => …]
```

## Documentation

There’s a lot more the PHP package can do. Check out the [repository on GitHub](https://github.com/ueberdosis/tiptap-php).
