ASCII Table Generator

Input Data (CSV or TSV โ€” first row = headers)
Delimiter
Alignment

Try an example

CSV data TSV data Mixed numbers
Copied!

What is ASCII Table Generator?

ASCII Table Generator creates formatted ASCII art tables from your data. Enter rows and columns as CSV or plain text, choose a table style (simple, grid, pipe, pretty, GitHub Markdown), and instantly get a preformatted table suitable for README files, terminal output, documentation, email (monospaced), or any context that needs a structured visual layout without HTML.

ASCII tables come in several styles: simple (spaces and dashes: ---- ----), grid (box-drawing characters: +----+----+), pipe (| col | col |), and GitHub Flavored Markdown (| col | --- | col |). GitHub Markdown tables are the most commonly used today -- they render in GitHub READMEs, GitLab, Notion, Obsidian, and most documentation tools. The pipe style (GFM) requires a separator row after the header (| --- | or | :---: | for center alignment).

ASCII table use cases: CLI tool output formatting (Go's tabwriter, Python's tabulate library, Rich library for Python), README documentation (feature comparison tables), terminal dashboards (htop-style displays), code comments explaining data structures, email newsletters in plain text format, and configuration file documentation. For web pages, use HTML tables or CSS Grid instead.

How to Use

  1. Enter your data as CSV (comma-separated) or paste tab-separated values.
  2. Set column headers in the first row (the header row is styled differently).
  3. Choose a table style: Simple, Grid, Pipe, or GitHub Markdown.
  4. Set alignment per column: left, center, or right.
  5. Copy the rendered ASCII table and paste it into your README, terminal output, or documentation.

Examples

CSV input: Name,Age,Role / Alice,30,Engineer

Result: | Name | Age | Role | |-------|-----|----------| | Alice | 30 | Engineer |

Grid style with right-aligned numbers

Result: +-------+------+ | Item | Cost | +-------+------+ | API | $10 | | DB | $5 | +-------+------+

Simple style for code comments

Result: Name Age Role ------- ---- -------- Alice 30 Engineer Bob 25 Designer

Frequently Asked Questions

What is the difference between ASCII table styles?

Simple style (spaces + dashes): readable in monospaced plain text, no border characters. Good for code comments and terminal output. Grid style (+----+ borders): uses + - | characters for a bordered table. Visually clear, good for documentation. Pipe/Markdown style (| col | --- |): used in GitHub Flavored Markdown, GitLab, Notion, Obsidian. The second row must be a separator (| --- |). Supports :---: for centered and ---: for right-aligned. Pretty/Unicode style: uses Unicode box-drawing characters (horizontal line, vertical bar) for a clean look in terminals that support Unicode. Choose based on where the output will be displayed.

How do I create tables in GitHub README files?

GitHub READMEs use GitHub Flavored Markdown (GFM) for tables. Syntax: | Header 1 | Header 2 | then | --- | --- | (separator row with at least 3 dashes) then | data | data |. Alignment: | :--- | left-aligned. | ---: | right-aligned. | :---: | centered. Rules: cells don't need to be aligned (GFM auto-renders). You can omit outer pipes on some renderers. Escape pipe characters in cells with a backslash (\|). Tables are block-level elements and must have a blank line before them. HTML tables also work in GitHub Markdown if you need more complex formatting.

How do I generate ASCII tables programmatically in Python?

Popular Python libraries: tabulate: pip install tabulate. from tabulate import tabulate; print(tabulate(data, headers=headers, tablefmt='grid')). Formats: 'plain', 'simple', 'grid', 'fancy_grid', 'pipe', 'presto', 'github', 'orgtbl', 'rst'. Rich: from rich.table import Table; from rich import print; table = Table(); table.add_column('Name'); table.add_row('Alice'). Renders colored, styled tables in the terminal. PrettyTable: pip install prettytable; from prettytable import PrettyTable. All three support sorting, alignment, and various output formats including HTML.

How do I format terminal output as a table in Go?

Go's text/tabwriter package aligns columns using tabs. Usage: w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0); fmt.Fprintln(w, 'Name\tAge\tRole'); fmt.Fprintln(w, 'Alice\t30\tEngineer'); w.Flush(). Parameters: minwidth (minimum cell width), tabwidth (tab width), padding (between columns), padchar (padding character), flags. For production CLI tools, consider the tablewriter package on GitHub (github.com/olekukonko/tablewriter) which supports borders, colors, alignment, and merge cells. Cobra (Go CLI framework) uses this internally.

What are the best tools for rendering tables in the terminal?

Rich (Python): the most feature-complete terminal table library. Supports colors, styles, borders, row highlighting, progress bars. rich.table.Table with live updating. Spectre.Console (.NET): Rich equivalent for C# -- Spectre.Console.AnsiConsole.Write(new Table()...). Ink (Node.js/React): React-based terminal rendering, including tables. tabulate (Python): simple, many formats, no colors. column command (Unix): column -t formats whitespace-separated input as a table. awk: awk '{printf "%-20s %-10s\n", $1, $2}' for fixed-width output. For interactive terminal UIs: bubbletea (Go), blessed (Node.js).

Related Tools