CSV to Screenshot Converter
Convert CSV data into a styled table screenshot. Upload or paste CSV, customize colors and fonts, then download as PNG or JPEG image.
About
Sharing tabular data as plain CSV often results in formatting loss across platforms. Email clients strip structure, chat apps collapse columns, and social media ignores whitespace entirely. This tool parses raw CSV input using an RFC 4180-compliant state machine and renders it onto an HTML5 Canvas element as a pixel-perfect table image. The output is a downloadable PNG or JPEG file with configurable font size, header color, row striping, and cell padding. It handles edge cases including quoted fields containing commas, embedded newlines within double-quoted cells, and escaped quote characters (""). Note: rendering is constrained by browser canvas size limits. Most browsers cap at approximately 16384 × 16384 pixels. Datasets exceeding 5000 rows may be truncated.
Formulas
The CSV parser operates as a finite state machine with four states:
Column width calculation uses canvas text measurement:
Where measureText uses the Canvas 2D context ctx.measureText() method to compute pixel width for each cell string, iterating all rows per column. The final image dimensions are:
Reference Data
| Feature | Detail | Limit / Note |
|---|---|---|
| CSV Standard | RFC 4180 | Full compliance including quoted fields |
| Max Rows | 5000 | Browser canvas size constraint |
| Max Columns | 100 | Practical rendering limit |
| Delimiter | Comma (,) | Auto-detect tab/semicolon support |
| Quoted Fields | Double-quote (") | Escaped as "" |
| Output: PNG | Lossless compression | Larger file size, sharp text |
| Output: JPEG | Lossy, configurable quality | Smaller file, slight artifacts |
| Font Size Range | 10 - 24 px | Canvas text rendering |
| Cell Padding | 4 - 20 px | Horizontal & vertical |
| Header Row | Bold, colored background | First row treated as header |
| Row Striping | Alternating background | Configurable colors |
| Max Canvas Width | 16384 px | Browser-dependent |
| Max Canvas Height | 16384 px | Browser-dependent |
| Copy to Clipboard | Clipboard API | Requires HTTPS or localhost |
| File Upload | Drag & Drop or file picker | .csv, .tsv, .txt |