SQL Query Result to CSV

Paste a MySQL or psql query result, or a box-drawn DuckDB table, and get a clean CSV or Excel table. Borders and row-count footers are removed.

Quick answer: Paste text from anywhere and get a clean table. The layout is detected for you.

Related: Text to Table: Paste Text, Get a Table · Paste Text into a Table for Excel · Convert Text to CSV · Markdown Table to CSV · CSV Guides and Free CSV Tools

How to use the SQL Query Result to CSV

Paste text from anywhere and get a clean table. The layout is detected for you.

Text to Table turns text you copied into a real table, with no settings to choose. Paste a table copied from Excel, Google Sheets, a web page, a PDF, an email or a chat, a Markdown table, a MySQL or psql result, a box-drawn terminal table, HTML table code, key: value lists or blocks, key=value log lines, or JSON and JSON Lines. The layout is detected, a title line above the table is skipped, and the first line is used as the header only when it really holds column names. Columns of numbers become numbers, including $1,234.50, 12.5%, (45.20) and decimal commas like 1,50, with the currency symbol or % moved into the column name. Codes with leading zeros, versions and long IDs stay as written. If the text mixes several layouts, the tool says so instead of guessing. Everything runs in your browser.

  1. Paste your text
  2. Check the detected table
  3. Download CSV, Excel, JSON or Parquet

Tips

Example

Input: | id | name | | 1 | Ada | 2 rows in set

Output: id,name 1,Ada

Browse by topic

Who uses Data Utility

Frequently asked questions · Data format benchmark

Frequently asked questions

Which tools are supported?

The MySQL client (+----+ borders), psql (---+--- rule and the (2 rows) footer), and tables drawn with box characters such as │ and ─ by DuckDB and other command-line tools.

Are numbers kept as numbers?

Yes. Columns that hold only numbers are typed as numbers, and NULL cells become empty.

Can I run SQL on my files here too?

Yes. SQL on Your Files runs SQL on CSV, Excel and Parquet files in your browser.

What text can Text to Table read?

Tab, comma, semicolon, pipe and space separated text, Markdown tables, and report-style text. Blocks of Key: value lines separated by blank lines become one row each, and sentences such as "Order #1001 was placed on 2026-10-20 by customer Rahul. Product: Laptop. Status: Delivered." become rows with columns for the repeated parts. The layout is found automatically, and you can pick it yourself if the columns look wrong. If the text mixes several layouts, the tool tells you instead of making a table that could be wrong.

Why does Text to Table say the text mixes layouts?

It only builds a table when the lines or blocks look alike. A paste that contains a log line, a JSON line, a sentence and a Key: value block together has no single set of columns, and any table made from it would be a guess. Paste one layout at a time, or choose the layout yourself in the list.

Related pages

Topic guides

Guides