How do I export and share my Postgres data via CSV, JSON, and Markdown?
Export and share your Postgres data in CSV, JSON, or Markdown format with one click. Download query results for analysis in Excel, import into other tools, or share formatted tables in documentation.
Export Query Results
After running a query, click the Share button in the header row. Choose your export format:
CSV - Comma-separated values for spreadsheet software like Excel, Google Sheets, or data analysis tools. The export includes column headers and preserves data types as text.
JSON - Array of objects with pretty formatting. Each row becomes a JSON object with column names as keys. Good for importing into applications, APIs, or processing with scripts.
Markdown - GitHub-flavored table format. Copy and paste directly into Notion, Confluence, GitHub README files, or any platform that renders Markdown.
Click Export and your browser downloads the file immediately. Files are named after your query (spaces converted to underscores).
CSV Export for Spreadsheets
CSV exports work in any spreadsheet program. Open the downloaded file in Excel or Google Sheets to analyze your Postgres data with formulas, pivot tables, and charts.
The CSV format preserves all data types as text values. Dates, numbers, and boolean values appear as their string representations. You can apply formatting in your spreadsheet software after importing.
Example use: Export monthly sales data from Postgres, open in Excel, create a pivot table to analyze revenue by product category.
JSON Export for Data Processing
JSON exports create an array of objects where each object represents one row. Column names become object keys. The output uses 2-space indentation for readability.
[
{
"user_id": 123,
"email": "[email protected]",
"signup_date": "2024-01-15",
"total_orders": 5
},
{
"user_id": 124,
"email": "[email protected]",
"signup_date": "2024-01-16",
"total_orders": 3
}
]
Use JSON exports when you need to import Postgres data into another application, process results with a script, or feed data into an API.
Markdown Export for Documentation
Markdown exports create formatted tables you can paste directly into documentation. The table includes headers and automatically escapes special characters.
Example markdown table:
| user_id | email | signup_date | total_orders | | --- | --- | --- | --- | | 123 | [email protected] | 2024-01-15 | 5 | | 124 | [email protected] | 2024-01-16 | 3 |
Paste this into GitHub issues, pull requests, README files, Notion pages, or Confluence documentation. The table renders with proper formatting wherever Markdown is supported.
Export Size Limits
Exports are limited to 50,000 rows. If your query returns more rows, you'll see an error message. Add a LIMIT clause to your SQL query to reduce the result set:
SELECT * FROM orders
WHERE created_at > '2024-01-01'
LIMIT 10000;
For larger datasets, split your export into multiple queries using LIMIT and OFFSET, or filter the data with WHERE clauses.
When to Use Each Format
Use CSV when:
- Analyzing data in Excel or Google Sheets
- Importing into business intelligence tools
- Sharing with non-technical team members who use spreadsheets
-
Creating charts and pivot tables Use JSON when:
-
Processing data with scripts (Python, JavaScript, etc.)
- Importing into another application or database
- Feeding results into an API
-
Working with developers who need structured data Use Markdown when:
-
Adding tables to documentation
- Sharing formatted data in GitHub, Notion, or wikis
- Creating readable reports without spreadsheet software
- Embedding data tables in README files or pull requests
Export vs. Share Publicly
Exports create a one-time download of your current query results. The file is static - it won't update when your database changes.
Public sharing (covered in a separate guide) creates a live link that always shows current data. Use public sharing when you want others to see live data. Use exports when you need a snapshot at a specific point in time.
Query Name Becomes Filename
Your export file is named after your query. For example, a query named "Weekly Revenue Report" exports as Weekly_Revenue_Report.csv, Weekly_Revenue_Report.json, or Weekly_Revenue_Report.md.
Rename your query before exporting to get a more descriptive filename. Click the query name at the top of the editor to rename it.