Skip to main content
Back to Tools
Web Tools

ANSI Color Code Generator

Generate ANSI escape codes for terminal text styling. Choose from 4-bit (16 colors), 8-bit (256 colors), or 24-bit true color modes. Add text effects like bold, italic, underline, and strikethrough. Get ready-to-use code snippets for Bash, Python, and Node.js. Runs entirely in your browser — your data never leaves your machine.

ansi terminal color escape-code cli bash

Published May 31, 2026

All interactive tools run entirely in your browser. Your data never leaves your device.

How It Works

Select a color mode (4-bit, 8-bit, or 24-bit), pick foreground and background colors, toggle text effects, and enter your text. The tool generates the ANSI escape sequence and provides copy-ready snippets for Bash echo -e, Python print(), and Node.js console.log(). A live visual preview shows approximately how the styled text will appear in a terminal.

Features

  • 3 color modes: 4-bit (16 standard colors), 8-bit (256 colors), 24-bit (true color RGB)
  • 8 text effects: bold, dim, italic, underline, blink, reverse, hidden, strikethrough
  • Live preview: visual approximation of terminal output
  • Multi-language output: Bash, Python, Node.js code snippets
  • 16 named colors: standard and bright ANSI color palette for 4-bit mode
  • 5 examples: success, error, warning, custom RGB, dim italic
  • Private: all computation runs in your browser — no data transmitted

Use Cases

  • Styling CLI tool output with colors and formatting
  • Building colored log messages for Node.js applications
  • Creating visually distinct terminal prompts
  • Adding color to shell scripts and automation tools