Blog

Terminal tables don't paste as tables. Here's how to convert them

Claude Code and many command line tools draw tables with box-drawing characters, the block of Unicode from U+2500 to U+257F:

┌──────────┬──────────────────────┐
│ Command  │ Effect               │
├──────────┼──────────────────────┤
│ --soft   │ keeps changes staged │
├──────────┼──────────────────────┤
│ --hard   │ discards the changes │
│          │ for good             │
└──────────┴──────────────────────┘

In a terminal with a monospaced font, that looks great. Paste it into GitHub, Notion, Slack or a doc, and it's a picture made of characters: proportional fonts break the alignment, nothing is sortable or editable as a table, and a cell that wrapped onto a second line has become a separate row.

Converting one by hand

  1. Delete the top and bottom borders (the lines with ┌ and └).
  2. Replace each │ with | and trim the padding inside cells.
  3. Replace the rule under the header (the line with ├ and ┼) with | --- | --- |, one --- per column.
  4. Delete the other rules, and merge any row whose cells wrapped back into one row.

The result is a Markdown table:

| Command | Effect |
| --- | --- |
| --soft | keeps changes staged |
| --hard | discards the changes for good |

Step 4 is where it goes wrong by hand: when rules separate every row, the lines between two rules are one row, and the second line of “discards the changes” belongs to the cell above it.

Or convert it in one paste

The free box table to Markdown tool does all four steps, merges wrapped cells, escapes any | inside a cell, and shows a preview. If the table came with a reply around it, the terminal text cleaner converts the table and fixes the rest of the text too.

On a Mac, Unwrap converts box tables automatically whenever you copy one from a terminal, and for Claude Code replies it pastes the Markdown table Claude actually wrote.