# ansi-to

> 😹 export ANSI to HTML, SVG, PNG, w/ iTerm2 color support

Latest version **1.5.2** (published 2026-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install ansi-to
pnpm add ansi-to
yarn add ansi-to
bun add ansi-to
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.5.2 |
| Published | 2026-09-07 |
| First published | 2018-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | F1LT3R |
| Maintainers | f1lt3r |
| Keywords | ansi-to-html, ansi-to-image, ansi-to-svg, ansi-to-dataurl, ansi, escape, convert, console, color, chalk, terminal, html, image, jpg, png, svg, data url, log |

## Links

- npm: https://www.npmjs.com/package/ansi-to
- Repository: https://github.com/F1LT3R/ansi-to
- Homepage: https://github.com/F1LT3R/ansi-to#readme
- Issues: https://github.com/F1LT3R/ansi-to/issues
- npm.io page: https://npm.io/package/ansi-to

## Dependencies (3)

- [deepmerge](https://npm.io/package/deepmerge.md) ^2.1.0
- [parse-ansi](https://npm.io/package/parse-ansi.md) ^1.0.3
- [itermcolors-to-hex](https://npm.io/package/itermcolors-to-hex.md) ^1.0.1

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.5.2 (latest) — 2026-09-07
- 1.5.1 — 2018-04-17
- 1.4.0 — 2018-04-11
- 1.3.2 — 2018-04-08
- 1.3.0 — 2018-04-07
- 1.0.0 — 2018-03-28

## README

# ANSI-to

> 😹  export ANSI color strings to various formats: HTML, SVG, PNG.

[![Build Status](https://travis-ci.org/F1LT3R/ansi-to.svg?branch=master)](https://travis-ci.org/F1LT3R/ansi-to)
[![Coverage Status](https://coveralls.io/repos/github/F1LT3R/ansi-to/badge.svg?branch=master)](https://coveralls.io/github/F1LT3R/ansi-to?branch=master)
[![NPM Version](https://img.shields.io/npm/v/ansi-to.svg)](https://www.npmjs.com/package/ansi-to)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)

ANSI-to takes a string of ANSI and converts it to various types of output. For example, this SVG:

[![Lead Image](ansi-to-svg-example.svg)](ansi-to-svg-example.svg)

## Support

Support the development of ANSI-to by [becoming a patreon](https://patreon.com/bePatron?u=9720216).

<a href="https://patreon.com/bePatron?u=9720216"><img width="120" src="https://f1lt3r.io/content/images/2018/04/become_a_patron_button@2x.png"></a>

## Features

ANSI-to has the following plugins available:

- [SVG](https://github.com/F1LT3R/ansi-to-svg.git) - Export ANSI to Scalable Vector Graphics
- [PNG, JPG](https://github.com/F1LT3R/ansi-to-image) - Export ANSI to raster image (JPG, PNG)
- [<strike>HTML</strike>](https://github.com/F1LT3R/ansi-to-html) (coming soon)

Important: Do not use ANSI-to directly. Please use one of the above plugins.

**General Features**

- iTerm2 color support - [Base16 iTerm2 Color Schemes](https://github.com/martinlindhe/base16-iterm2)
- Use output in your `README.md` files
- Designed for use with [Chalk](https://github.com/chalk/chalk)
- Plugin architecture to build-your-own ANSI Parser
- Built-in default colors
- User can override colors
- Emoji support
- Powerline font support

## Why ANSI-to ?

ANSI-to is designed for use with ZTD development (Zero Technical Debt). ANSI-to provides a Markdown friendly way to include CLI output in your software documentation.

---
_Source: https://npm.io/package/ansi-to · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
