What Are ASCII Art Tables?
ASCII art tables — also known as text-based tables, box-drawing tables, or plain text tables — are tables created entirely using standard keyboard characters. They're a fundamental part of developer culture, appearing in README files, terminal outputs, log files, technical documentation, and code comments. Unlike HTML or Markdown tables, ASCII tables render identically in any monospace font environment, making them universally compatible across platforms, text editors, terminals, and even email.
Despite the rise of rich text formatting and GUI tools, ASCII tables remain incredibly relevant. They're the de facto standard for displaying data in command-line applications, database query results (MySQL, PostgreSQL, SQLite), debugging output, and plain-text documentation. If you've ever run a SQL query in a terminal client, you've seen an ASCII table. In this guide, we'll explore different styles, creation methods, and tools for generating ASCII art tables.
Common ASCII Table Styles
Simple Style (MySQL-like)
The most common ASCII table style, used by MySQL, many CLI tools, and most documentation:
+----------+-------+----------+
| Name | Age | City |
+----------+-------+----------+
| Alice | 30 | New York |
| Bob | 25 | London |
| Charlie | 35 | Tokyo |
+----------+-------+----------+
This style uses + for intersections, - for horizontal borders, and | for vertical borders. It's clean, widely recognized, and renders well in any monospace context.
Double-Line Style (PostgreSQL-like)
Uses different characters for the header separator to distinguish headers from data:
+----------+-------+----------+
| Name | Age | City |
+==========+=======+==========+
| Alice | 30 | New York |
| Bob | 25 | London |
| Charlie | 35 | Tokyo |
+----------+-------+----------+
The = characters in the separator line make the header row visually prominent, which improves readability in longer tables.
Rounded Style
A softer visual style using Unicode box-drawing characters:
╭──────────┬───────┬──────────╮
│ Name │ Age │ City │
├──────────┼───────┼──────────┤
│ Alice │ 30 │ New York │
│ Bob │ 25 │ London │
│ Charlie │ 35 │ Tokyo │
╰──────────┴───────┴──────────╯
This style uses Unicode box-drawing characters for rounded corners and thinner lines. It looks more polished but requires Unicode support (which is universal in modern terminals and editors).
Double-Border Style
╔══════════╦═══════╦══════════╗
║ Name ║ Age ║ City ║
╠══════════╬═══════╬══════════╣
║ Alice ║ 30 ║ New York ║
║ Bob ║ 25 ║ London ║
║ Charlie ║ 35 ║ Tokyo ║
╚══════════╩═══════╩══════════╝
Uses double-line box-drawing characters for a bold, emphasis-heavy appearance. This style is common in DOS/Windows console applications and retro-style interfaces.
Compact Style (No Borders)
Name Age City
-------- ---- --------
Alice 30 New York
Bob 25 London
Charlie 35 Tokyo
The simplest style — just aligned columns with a dashed header separator. This is what PostgreSQL uses by default and is popular in many CLI tools because of its minimal visual noise.
Creating ASCII Tables Manually
The Manual Process
- Determine column widths — Find the longest content in each column (including the header)
- Create the separator line — Generate
+and-characters matching column widths - Format each row — Pad each cell to the column width and surround with
| - Assemble — Stack separator lines and data rows in the correct order
This manual process is obviously tedious for anything beyond a 3x3 table. That's why automated tools exist.
Online ASCII Table Generators
The fastest way to create ASCII tables from existing data is to use an online converter. ConvertMatrix lets you convert data from any format (Excel, CSV, JSON, SQL, etc.) directly into perfectly formatted ASCII tables.
How to Use ConvertMatrix for ASCII Tables
- Navigate to any ASCII converter (e.g., CSV to ASCII or Excel to ASCII)
- Paste your data or upload a file
- Choose your preferred table style (simple, rounded, double-border)
- Click Convert to generate the ASCII table
- Copy the output and paste it anywhere
All conversion happens in your browser — no data is uploaded to any server, so your information stays completely private.
Programmatic ASCII Table Generation
Python — tabulate Library
The tabulate library is the go-to tool for ASCII tables in Python:
from tabulate import tabulate
data = [
["Alice", 30, "New York", "Engineer"],
["Bob", 25, "London", "Designer"],
["Charlie", 35, "Tokyo", "Manager"],
["Diana", 28, "Paris", "Analyst"]
]
headers = ["Name", "Age", "City", "Role"]
# Different styles
print("=== Grid Style ===")
print(tabulate(data, headers, tablefmt="grid"))
print("\n=== Fancy Grid ===")
print(tabulate(data, headers, tablefmt="fancy_grid"))
print("\n=== Pipe Style (Markdown) ===")
print(tabulate(data, headers, tablefmt="pipe"))
print("\n=== reStructuredText ===")
print(tabulate(data, headers, tablefmt="rst"))
The tabulate library supports over 20 different table formats including grid, fancy_grid, pipe, rst, simple, plain, github, and more. Install it with pip install tabulate.
JavaScript — cli-table3
const Table = require('cli-table3');
const table = new Table({
head: ['Name', 'Age', 'City', 'Role'],
style: { head: ['cyan'] }
});
table.push(
['Alice', '30', 'New York', 'Engineer'],
['Bob', '25', 'London', 'Designer'],
['Charlie', '35', 'Tokyo', 'Manager']
);
console.log(table.toString());
Bash — column Command
# Using column for simple alignment
echo -e "Name\tAge\tCity\nAlice\t30\tNew York\nBob\t25\tLondon" | column -t -s$'\t'
# Using printf for custom formatting
printf "%-12s %-6s %-12s\n" "Name" "Age" "City"
printf "%-12s %-6s %-12s\n" "--------" "----" "--------"
printf "%-12s %-6s %-12s\n" "Alice" "30" "New York"
printf "%-12s %-6s %-12s\n" "Bob" "25" "London"
Use Cases for ASCII Tables
README Files
While GitHub renders Markdown tables beautifully, ASCII tables are useful in plain-text READMEs (plain .txt files) or when you want your table to look perfect in any viewer:
# Feature Comparison
+------------------+------+----------+--------+
| Feature | Free | Standard | Pro |
+------------------+------+----------+--------+
| Users | 5 | 25 | ∞ |
| Storage | 1 GB | 50 GB | 500 GB |
| API Access | No | Yes | Yes |
| Priority Support | No | No | Yes |
+------------------+------+----------+--------+
Database Query Output
Every major database CLI formats results as ASCII tables. Understanding this format helps you read query results faster and share them effectively in tickets and documentation.
Log Files and Monitoring
ASCII tables are commonly used in log files, cron job reports, and monitoring dashboards for structured data output that's both human-readable and grep-friendly.
Email Communication
When sharing data via plain-text email, ASCII tables are the only reliable way to present tabular data without HTML formatting issues.
Column Alignment Options
Proper alignment significantly improves readability:
+----------+--------+------------+
| Name | Age | Salary |
+----------+--------+------------+
| Alice | 30 | $85,000.00 |
| Bob | 25 | $72,500.00 |
| Charlie | 35 | $95,000.00 |
+----------+--------+------------+
In this example, text fields are left-aligned and numeric fields are right-aligned — a best practice that makes data easier to scan and compare. Most ASCII table generators support configurable alignment per column.
Handling Long Content
When cell content exceeds a reasonable width, you have several options:
- Truncation — Cut content at a maximum width with an ellipsis:
This is a very lo... - Wrapping — Break content across multiple lines within the same cell
- Scrolling — In terminal applications, allow horizontal scrolling
- Abbreviation — Replace common words with abbreviations
For most plain-text contexts, truncation is the preferred approach. A good rule of thumb is to keep the total table width under 80 characters (the traditional terminal width) or 120 characters for modern displays.
Conclusion
ASCII art tables remain one of the most universally compatible ways to display structured data. Whether you're documenting APIs in README files, formatting database query output, building CLI applications, or sharing data via plain-text channels, knowing how to create and format ASCII tables is a valuable skill. Use online tools like ConvertMatrix for quick conversions from any data source, or leverage programming libraries like Python's tabulate or JavaScript's cli-table3 for automated table generation in your applications.
Try Our Free Conversion Tools
Put what you've learned into practice with our browser-based converters: