UnQTools
Developer Runs in your browser

ANSI Escape Code / Terminal Color Generator

Visually compose terminal text styling — FG/BG color in 16/256/24-bit truecolor, SGR styles (bold, faint, italic, underline, blink, inverse, hidden, strikethrough) — and get the exact ANSI escape sequence with a live preview. Multi-format escape output (\x1b, \033, \e, \u001b, raw ESC), language snippets (bash printf, Python, JS, Go, Rust, C), reverse decoder (paste a sequence → see what it does), hex→256 and hex→truecolor conversion, 256-color palette grid, strip-ANSI helper, terminal-support notes. 100% client-side.

100% Private Works Offline Instant

About ANSI Escape Code / Terminal Color Generator

Visually compose terminal text styling — FG/BG color in 16/256/24-bit truecolor, SGR styles (bold, faint, italic, underline, blink, inverse, hidden, strikethrough) — and get the exact ANSI escape sequence with a live preview. Multi-format escape output (\x1b, \033, \e, \u001b, raw ESC), language snippets (bash printf, Python, JS, Go, Rust, C), reverse decoder (paste a sequence → see what it does), hex→256 and hex→truecolor conversion, 256-color palette grid, strip-ANSI helper, terminal-support notes. 100% client-side. Everything runs locally in your browser — your data never leaves your device.

How to use

  1. Enter your input in the tool above.
  2. Adjust any options to your preference.
  3. Use the Copy or Download buttons to save the result.
  4. Everything happens locally — your data never leaves your browser.

FAQ

What color modes does the generator support?

All four: (1) Standard 16-color (codes 30–37 / 40–47 foreground/background). (2) Bright 16-color (90–97 / 100–107). (3) 256-color cube (38;5;N / 48;5;N where N is 0–255, with 16 + 36r + 6g + b cube math and a 232–255 grayscale ramp). (4) 24-bit truecolor (38;2;r;g;b / 48;2;r;g;b). Plus every SGR style — bold, faint, italic, underline, blink, inverse, hidden, strikethrough.

Which escape sequence formats can I copy?

Five. The same SGR parameters can be rendered as \x1b[…m (JS/C/Go string), \033[…m (shell printf), \e[…m (bash echo -e), \u001b[…m (JS template literal / JSON), or a raw ESC character (0x1B). The tool always auto-appends \x1b[0m reset to avoid color bleed, and you can toggle showing a visible ^[ marker versus the literal escape.

Does it generate language-specific snippets?

Yes — copy-ready snippets for bash `printf` and `echo -e`, Python 3 (`print('\033[31m…')`), Node.js (`process.stdout.write`), Go (`fmt.Printf`), Rust (`print!` with `\x1b`), and C (`printf`). Each snippet wraps your sample text with the chosen escape and reset so it compiles and runs verbatim.

Can I decode an existing ANSI sequence?

Yes. Paste any string containing SGR escape codes (e.g. `\x1b[1;38;5;208mHello\x1b[0m`) and the reverse decoder lists every applied attribute — styles, foreground color (with mode + value), background color, and any resets. It also flags malformed sequences. A `strip ANSI` helper removes all escapes from a string.

What extra features does this tool have versus other ANSI generators?

(1) Four color modes (16, bright, 256, truecolor) with FG and BG pickers. (2) All 8 SGR styles as independent toggles. (3) Five escape-format renderings. (4) Language snippets for bash/Python/JS/Go/Rust/C. (5) Reverse decoder for pasted sequences. (6) hex→256 and hex→truecolor conversion with the canonical 16+36r+6g+b cube math. (7) 256-color palette grid with IDs. (8) Live terminal-style preview that honors the codes. (9) Strip-ANSI helper. (10) Terminal-support notes (truecolor/italic/blink caveats). (11) Reset auto-appended to prevent bleed. (12) Visible-^[ toggle. (13) Copy sequence / copy snippet / share URL. (14) History (localStorage, last 20). 100% client-side — nothing uploaded, no ads.

Search tools and actions

Search across all 616 tools, categories, and quick actions.