ANSI Color Text Generator

Make colored, bold, and underlined text using ANSI escape codes. Type your text, pick colors, and copy the result straight into a Discord message or a terminal. Everything runs in your browser, so your text stays on your device.

Text to color
Text color
Background color
Preview
Colored ANSI text

This is an approximation. Exact shades depend on the app, terminal, or Discord theme showing the text.

Discord message
Paste straight into Discord

What are ANSI color codes?

ANSI color codes are short sequences of characters that tell a terminal or app how to color and style text. Each one starts with an invisible escape character, followed by a number like 31 for red or 1 for bold, and ends with the letter m. A reset code turns the styling back off. This tool builds those codes for you from the colors you pick, so you do not have to remember the numbers. Discord reads the same codes inside a special code block, which is why the tool can make colored chat messages too.

Why use our ANSI color text generator

  • ·Free. No signup, no paywall, no limits.
  • ·Live preview. See the colors as you pick them, before you copy.
  • ·Discord ready. Copy a code block that pastes straight into a message.
  • ·Works in terminals too. Switch to raw ANSI for scripts and command line output.
  • ·Runs in your browser. Nothing gets uploaded, your text stays with you.

Options explained

Text color

Sets the foreground color of your text. Pick from the eight ANSI colors Discord supports, plus the default. Each one maps to a standard SGR code like 31 for red or 32 for green.

Beforeplain textAfter[32mgreen text[0m

Background color

Fills the area behind your text with one of the eight ANSI background colors, or leave it as None. Background codes run from 40 to 47.

Beforeplain textAfter[45mtext on blurple[0m

Bold

Adds the bold attribute (SGR code 1). In Discord this also brightens the text color, which is a common way to reach the lighter shades.

Before[31mred[0mAfter[1;31mbold red[0m

Output format

Discord block wraps the result in an ```ansi code block so it renders in color when you send it. Raw ANSI gives you just the escape sequence for terminals and scripts.

Beforeraw sequenceAfter```ansi ... ```

Who uses ANSI colored text

ANSI colors show up anywhere text needs to stand out with color. Here are the most common reasons people reach for them:

  • ·Discord messages. Highlight a heading, a warning, or a name in a server post or an announcement.
  • ·Command line tools. Color the output of a script so errors are red and success is green.
  • ·Logs and reports. Make key lines easier to spot when you scan terminal output.
  • ·Learning the codes. See how each color and style maps to its ANSI number as you build a sequence.

Frequently asked questions

What is ANSI color text?
ANSI color text uses short escape codes, called SGR codes, to tell a terminal or app how to color and style text. A code like \u001b[31m turns the text red, and \u001b[0m resets it back to normal. The codes are invisible themselves. Only the color they set shows up.
How do I make colored text in Discord?
Type your text, pick a text color and any style you want, then keep the format on Discord block. Click copy and paste the result into a Discord message on desktop. Discord reads the ```ansi code block and shows your text in color. The colors do not appear while you type, only after you send the message.
Why is my Discord colored text not showing up?
Colored ANSI text only renders in the Discord desktop and web apps, not in the mobile app, and only inside an ```ansi code block. Make sure you copied the whole block, including the opening ```ansi line and the closing ```. Also check that Discord did not strip the formatting when you edited the message.
Which colors can I use?
Discord supports eight foreground colors (gray, red, green, yellow, blue, pink, cyan, and white) and eight background colors. This tool shows exactly that set, since the wider 256-color and true-color ranges are not supported inside a Discord ansi block.
Does this work in a terminal?
Yes. Switch the output format to Raw ANSI to get the plain escape sequence. Most terminals, shells, and logging setups read these SGR codes, so you can paste the sequence into a script or print it to color your command line output.
Why does the copied text look empty or have odd characters?
The escape codes use an invisible control character, so the copied text may look like it starts with a gap or, in some editors, a small symbol. That is normal. The character is what triggers the color. The output box on this page shows it as \u001b so you can see where each code sits.
Is my text private?
Yes. Everything runs in your browser. Your text is never uploaded to a server, so nothing you type here is stored or sent anywhere. Once the page has loaded you can even use it offline.