---
url: /api/packages/core/src/functions/decodeIconSvg.md
---
[pantoken-root](../../../../index.md) / [packages/core/src](../index.md) / decodeIconSvg

# Function: decodeIconSvg()

> **decodeIconSvg**(`value`): `string`

Beta

Decode an icon token's `url('data:…')` value back to inline SVG.

## Parameters

### value

`string`

## Returns

`string`

## Example

```ts
import { decodeIconSvg } from "@pantoken/core";

const svg = "<svg viewBox='0 0 24 24'><path d='M1 1'/></svg>";
const value = `url('data:image/svg+xml;utf8,${encodeURIComponent(svg)}')`;
decodeIconSvg(value); // → "<svg viewBox='0 0 24 24'><path d='M1 1'/></svg>"
```
