CSV to PDF Converter
Convert CSV files to professionally formatted PDF documents with custom styling, auto-column sizing, and multi-page support. Free, client-side, no upload.
Drop your CSV file here or browse
Supports .csv and .tsv files up to 50 MB
Parsing...
Preview
About
CSV files lack visual structure. Opening a 10,000-row dataset in a text editor produces an unreadable wall of comma-separated values. Sharing raw CSV with stakeholders risks misinterpretation: shifted columns, encoding errors, or delimiter confusion corrupt the data silently. This converter parses your CSV using an RFC 4180-compliant state machine, handles quoted fields containing commas and newlines, auto-detects delimiters (comma, semicolon, tab), and generates a valid PDF 1.4 binary entirely in your browser. No data leaves your machine.
The PDF renderer calculates column widths proportionally based on content length, applies page breaks when rows exceed available vertical space, and embeds Helvetica as a base font (no subsetting required per PDF spec). Limitation: Unicode characters outside the Latin-1 (ISO 8859-1) range render as placeholder glyphs. For CJK or Arabic datasets, pre-filter your data. Maximum tested throughput is approximately 50,000 rows at 8 columns before browser memory constraints apply.
Formulas
The converter calculates proportional column widths to fit the available page area. For each column j, the maximum content length Lj across all rows is measured in characters. The allocated width Wj in PDF points is:
Where Wpage = PageWidth − 2 × Margin is the usable content width in points. Each column is clamped to a minimum of 30 pt to prevent zero-width columns.
Rows per page R determines page-break positions:
Where Hrow = fontSize × 1.8 accounts for line height plus cell padding. The header row height Hheader uses a 1.2× multiplier for visual weight.
CSV delimiter auto-detection counts occurrences of each candidate delimiter (, ; \t | :) in the first 5 lines. The delimiter with the highest consistent frequency (lowest standard deviation across lines) wins.
Reference Data
| Delimiter | Symbol | Common Use | Auto-Detected |
|---|---|---|---|
| Comma | , | Standard CSV (RFC 4180) | Yes |
| Semicolon | ; | European locale CSV (Excel EU) | Yes |
| Tab | \t | TSV files, database exports | Yes |
| Pipe | | | Unix log files, legacy systems | Yes |
| Colon | : | /etc/passwd, config files | Yes |
| PDF Page Size | Width mm | Height mm | Width pt | Height pt |
|---|---|---|---|---|
| A4 Portrait | 210 | 297 | 595.28 | 841.89 |
| A4 Landscape | 297 | 210 | 841.89 | 595.28 |
| Letter Portrait | 215.9 | 279.4 | 612 | 792 |
| Letter Landscape | 279.4 | 215.9 | 792 | 612 |
| Legal Portrait | 215.9 | 355.6 | 612 | 1008 |
| Legal Landscape | 355.6 | 215.9 | 1008 | 612 |
| Font Size pt | Approx. Chars per A4 Width | Rows per A4 Page | Best For |
|---|---|---|---|
| 6 | ~160 | ~95 | Dense data, many columns |
| 7 | ~135 | ~82 | Compact reports |
| 8 | ~120 | ~72 | Standard readability |
| 9 | ~105 | ~64 | Comfortable reading |
| 10 | ~95 | ~57 | Presentations |
| 11 | ~85 | ~52 | Large print, few columns |
| 12 | ~78 | ~48 | Title rows, emphasis |