ANSI color code generator
Wrap text in ANSI escape codes to color and style it in a terminal.
ANSI color code generator
Paste text and this tool wraps each line in ANSI escape sequences so it prints in color in a terminal. It is built for CLI authors, log formatting and shell scripts that want a green "OK", a red "FAIL" or a highlighted heading without hardcoding raw escape bytes by hand.
Pick a foreground and background color from the 16 basic terminal colors, the 256-color cube (an index from 0–255), or a 24-bit hex value for true color terminals. Add styles — bold, dim, italic, underline, blink, inverse or strikethrough — and they combine into a single SGR sequence. The escape notation option controls how the escape byte itself is written: raw \u001b for pasting straight into a file, \e for shell double-quoted strings, \033 for C or Python string literals, or a ready-to-run printf command. Turn on "Rotate a color per line" to cycle a small palette across the lines of a list or log, and "Show terminal preview" to append a plain-text description of how each line would render, since a text panel cannot draw real terminal colors itself.
Line endings are read the same whether they are CRLF or LF, and the reset sequence at the end of each line is optional — turn it off if you are building a run of colored segments that share one reset at the very end. Very large inputs are capped so the browser tab never freezes; if a paste would produce more than the limit, the tool reports that instead of hanging.
Everything runs locally in your browser — the text you paste is never uploaded anywhere. Copy the result, download it as a .txt file, or send the output back into the input to layer another option on top.