Type a few lines and get them framed in a neat box made of Unicode box-drawing characters or plain ASCII. Pick single, double, rounded, heavy, dashed, stars or your own characters, then set alignment, padding, a title and word wrap.
Last updated:
Border style
Boxed text
Box drawing only lines up in a monospaced font. In chat apps paste it with Copy as code block (adds ``` fences), in code use it inside a comment.
Advertisement
Advertisement
How to use the Text Border Generator
Type or paste your text; each line becomes a line inside the box.
Choose a border style from the gallery, or pick Custom and enter your own corner and edge characters.
Set alignment and padding, and optionally a title, a wrap width or a minimum width.
Check the live preview, which uses a monospaced font like most code editors and terminals.
Copy the box or copy it as a code block, then paste it into your code comment, README, chat or notes.
Box-drawing characters reference
Unicode has a dedicated Box Drawing block (U+2500 to U+257F) designed so that lines join seamlessly in monospaced fonts. These are the characters the main styles use.
Style
Corners
Horizontal
Vertical
T-joins
Code points
Single (light)
┌ ┐ └ ┘
─
│
├ ┤
U+250C, U+2510, U+2514, U+2518, U+2500, U+2502
Double
╔ ╗ ╚ ╝
═
║
╠ ╣
U+2554, U+2557, U+255A, U+255D, U+2550, U+2551
Rounded
╭ ╮ ╰ ╯
─
│
├ ┤
U+256D to U+2570
Heavy
┏ ┓ ┗ ┛
━
┃
┣ ┫
U+250F, U+2513, U+2517, U+251B, U+2501, U+2503
Dashed
┌ ┐ └ ┘
┄
┆
├ ┤
U+2504, U+2506
Double top and bottom
╒ ╕ ╘ ╛
═
│
╞ ╡
U+2552, U+2555, U+2558, U+255B
Blocks
▛ ▜ ▙ ▟
▀ ▄
▌ ▐
none
Block Elements U+2580 to U+259F
How the box is measured
The generator finds the widest line, adds the side padding on both sides, and draws the top and bottom edges to exactly that width plus the two side characters. Shorter lines are padded with spaces according to the alignment you choose; with center alignment an odd leftover space goes to the right. Width is counted in terminal columns, not characters: emoji, Chinese, Japanese and Korean characters count as two columns, combining accents and zero-width characters count as zero, and tabs are expanded to four spaces. That is the same rule most code editors and terminals use, so the right edge stays straight when you paste.
Where boxed text works well
Code comments and file headers: a boxed title makes sections easy to spot when scrolling through a long file.
README files and docs: put the box inside a fenced code block so it keeps its shape on GitHub and in Markdown viewers.
Terminal and CLI output: banners and warnings in scripts, help screens and log summaries.
Chat and forums: use Copy as code block so Discord, Slack and similar apps render it in a monospaced font.
Plain-text email and notes: choose an ASCII style when you are not sure the reader's font supports box-drawing characters.
Frequently asked questions
Why does my box look broken after pasting?
Box drawing only lines up in a monospaced font, where every character has the same width. Paste it into a code editor, terminal, or a code block (```) in chat apps such as Discord, Slack or GitHub. In proportional fonts the edges will drift.
Which style is safest to use everywhere?
The ASCII styles (+ - |, stars and hash) use only basic keyboard characters, so they display correctly in any monospaced font, old terminals and plain-text email. Unicode box-drawing styles look smoother but need a font that includes those characters, which nearly all modern fonts do.
Why are emoji treated as double width?
Most terminals and code editors draw emoji and Chinese, Japanese and Korean characters two columns wide. Counting them as two keeps the right edge straight. If your editor draws them single width, untick that option.
Can I put a title in the border?
Yes. Type it in Title in top border and it appears inside the top edge, for example ┌─ Notes ──────┐. The box grows if the title is longer than the text.
How do I make all my boxes the same width?
Set a Minimum inner width. Every box is at least that wide, which helps when you stack several boxed notes or comment banners in a file.
Can I use this for code comments?
Yes. Make the box, copy it, and add your language's comment marker in front of each line, or use the Add Prefix and Suffix to Lines tool to add // or # to every line at once.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.