T

Text Machine

Powerful text tools, in your browser

Text Box Generator

Wrap any text in a drawn box or border made of plain Unicode line characters. Type or paste your text, choose a frame style, alignment, and padding, then copy the result. It is ordinary text, not an image, so the box pastes into a comment, README, code block, terminal, or chat — and nothing leaves your browser.

Your text
Box style

Align

Padding

How to use Text Box

  1. 1

    Type or paste your text

    Enter the text you want to frame. One line or many — the box grows to fit the widest line.

  2. 2

    Pick a box style

    Choose a frame like Single, Rounded, Double, Bold, ASCII, Dashed, Star, or Block to match where you will paste it.

  3. 3

    Set alignment and padding

    Align the text left, center, or right inside the box, and add inner padding for a little breathing room around the words.

  4. 4

    Copy and paste

    The boxed text appears instantly below. Copy it and drop it into a comment, README, code block, terminal, or chat.

About drawing boxes and borders around text

What box-drawing characters are

Long before graphics, terminals drew tables, frames, and menus using a special block of Unicode characters made just for the job: corners, horizontal and vertical lines, and junctions that join seamlessly into a continuous border. Those same characters still work in any modern app, so you can frame a note or a heading with a real rectangle instead of a row of dashes that does not quite meet at the corners.

Because each glyph is ordinary text, a box you build here is not an image. It copies and pastes like any other words, survives being quoted or edited, and can be read by anything that reads text — which is why boxed text shows up in README files, command-line tools, and code comments everywhere.

A look inside the Unicode box-drawing block

The line glyphs come from a dedicated range of Unicode called the Box Drawing block, a set of around 128 characters designed in the era of text terminals so software could paint tables and windows. It holds the four corners, the horizontal and vertical lines, and the T-shaped and cross-shaped junctions, in several weights: thin, heavy, and doubled. The rounded corners that give the Rounded style its soft look are part of the same block, which is why the curve meets the straight lines cleanly.

Knowing the block exists explains why the frames here connect perfectly while a hand-typed border of dashes and pluses never quite does. A real top-left corner glyph is built to meet a real horizontal line at exactly the right height, so the rectangle closes without gaps — something the underscore and bar keys on your keyboard cannot promise.

Choosing a style and layout

The frame styles set the mood. Single and Rounded are quiet and neat for a small note; Double and Bold draw more attention, good for a title or a warning; ASCII is the safe choice when you are not sure the destination supports fancy characters, since it uses only the most basic keys. Star and Block are decorative and stand out in a chat or a banner.

Alignment and padding control how the words sit inside the frame. Center alignment suits a short title, while left stays natural for a list or a sentence. A padding of one or two adds a margin of space so the text does not touch the border, which usually reads better than a frame pressed tight against the letters.

Unicode borders versus the ASCII fallback

There are two families of frame here, and picking the right one is mostly about where the box will live. The Unicode styles — Single, Rounded, Double, and Bold — draw crisp, continuous lines and look their best in modern apps that fully support the box-drawing block, which today is almost everywhere. The ASCII style is deliberately plainer: it builds the frame from only the plus, minus, and pipe keys, the characters every system has supported since the beginning.

Reach for ASCII when the destination is old, unknown, or strict about characters — a legacy terminal, a config file, an email in plain text, or code that must stay pure ASCII. The corners will look a little blockier because a plus sign is doing the job of a real corner glyph, but the box is guaranteed to render the same everywhere. For everything else, the Unicode styles give a cleaner result.

Why monospace fonts matter, and a worked example

A drawn box only stays square when every character occupies the same width, which is the defining trait of a monospace, or fixed-width, font. In that setting the top line, the bottom line, and the side bars all measure out to the same number of columns, so the rectangle closes neatly. Type Hello in this tool with a Single frame and a padding of one and you get a top line of corners and dashes, a middle line reading │ Hello │, and a matching bottom line — three rows whose edges align perfectly in any code font.

Drop that same box into a chat that uses a proportional font and the illusion breaks, because a slim letter like i takes less room than a wide one like m, leaving the right border ragged. The fix is to put the box where a fixed-width font rules — a code block or a terminal — rather than to change the box itself.

Aligning boxes that contain wide characters

Most letters and digits take one column, but some characters take two. Emoji, and Chinese, Japanese, and Korean text, are double-width in a terminal, so the tool may count them as one character while the screen draws them across two columns. The result is a box whose right edge looks a column off even though the underlying text is rectangular — the count is right, but the rendering is wider.

This is a property of how fonts display those scripts, not a flaw in the box. If a frame around emoji or CJK text looks lopsided, a plain Single or ASCII style tolerates the difference best, and adding a little padding can hide a one-column drift. For perfectly square results, keep the contents to single-width characters.

Using boxed text well

Boxed text shines when it marks something out — a title at the top of a README, a note in a code comment, an ASCII banner in a terminal program, or a highlighted message in a code block on a forum. Reach for a box when a block of text deserves a visible frame, and keep the content short so the rectangle stays a sensible width.

The one rule that matters is the font. A box only stays square in a monospace setting, so paste it where a fixed-width font is used, and prefer a simple line style if you cannot be sure. On GitHub, Discord, Reddit, and Slack that means wrapping the box in a code block, which forces a fixed-width font and keeps every edge in line.

Frequently asked questions

What is a text box generator?
It is a tool that surrounds your text with a drawn rectangle made from box-drawing characters — the line and corner glyphs like the ones in single, double, or rounded frames. The result is plain text, so it can be pasted anywhere as a tidy framed block rather than a loose line of words.
How do I copy the box?
Type your text, choose a style, then press the copy button above the boxed output. The whole frame, including the borders and your text, is copied to your clipboard ready to paste.
Where does boxed text look best?
Anywhere that uses a monospace (fixed-width) font, where every character is the same width — code blocks on GitHub, Discord, Reddit, and Slack, README files, terminals, and code comments. In those places the frame lines up perfectly into a clean rectangle.
Why does the box look crooked in some apps?
Most chat boxes and documents use a proportional font, where an i is narrower than an m, so the right edge of the box can look ragged. Paste the box inside a code block or switch the area to a monospace font and the edges snap back into line. Wide characters such as emoji and Chinese, Japanese, or Korean text take two columns in a terminal, so a box around them can also look a column off — that is a font property, not an error.
What is the difference between the styles?
They draw the same rectangle with different line glyphs. Single, Rounded, Double, and Bold use Unicode box-drawing lines with square, curved, doubled, or heavy strokes. ASCII uses only plus, minus, and pipe so it works in the most basic environments. Dashed uses a broken line, Star builds the frame from asterisks, and Block uses solid half-block shapes for a chunky look.
Is my text sent anywhere?
No. The box is built entirely in your browser as you type. Nothing you enter is uploaded to a server, logged, or stored.

Related tools

Keep going with these handy tools

Fancy Text Generator

Zalgo Text Generator

Upside Down Text Generator

Strikethrough Text Generator

Redacted Text Generator

Invisible Text Generator