---
title: Purifier
---

# Purifier

<div class="documentation__toc"></div>

## Introduction

The purifier service is a simple class that securely sanitizes strings.


## Basic Usage

You can use the purifier utility by using the `\Anomaly\Streams\Platform\Support\Purifier` class.

```php
use \Anomaly\Streams\Platform\Support\Purifier;

$purifier = new Purifier();
```

### purify

The `purify` method returns a sanitized string.

```php
use \Anomaly\Streams\Platform\Support\Purifier;

echo (new Purifier())->purify($dangerousHtml);
```
