ANSI Color Code Generator

ANSI Color Code Generator

Build styled terminal output strings using ANSI escape codes. Choose foreground/background colors (named, 256-color, or truecolor), apply bold, italic, underline. Preview live in a fake terminal.

Foreground Color
Selected: Red (code 31)
Background Color
Text Styles
Input Text
Terminal Preview
Hello, World!

Build ANSI escape sequences visually with live terminal preview, decompose existing escape codes, and reference the full 16-color standard — all client-side.

ANSI Color Code Generator

Build styled terminal output strings using ANSI escape codes. Choose foreground/background colors (named, 256-color, or truecolor), apply bold, italic, underline. Preview live in a fake terminal.

Common uses

  • Generate bold green output for a terminal success message
  • Build a 256-color bash prompt string
  • Decompose an existing ANSI escape sequence into its parts

Also searched as

  • ansi color code generator
  • ansi escape sequence builder
  • decode ansi escape sequence
  • 256 color terminal text escape code
  • truecolor terminal escape codes
  • bold green terminal text escape code
  • ansi color reference table
  • terminal color preview online
  • ansi background foreground codes

Frequently asked questions

How do I make colored terminal output with ANSI codes?

Use the Builder to pick foreground and background colors (named, 256-color or truecolor) and styles like bold, dim, italic, underline, blink and strikethrough, then copy the escape code, shell command or Python snippet.

How do I decode an existing ANSI escape sequence?

Paste it into the Decompose tab to split it into its component parts.

Can I preview the result?

Yes, a terminal-style preview shows your styled text live.

Is my data uploaded to a server?

No. This tool runs entirely in your browser — your input is processed locally on your device and is never uploaded or stored on a server.