All tools
Free · Private · No upload

Convert CSV to PDF Online

Print a CSV as a clean PDF table, with the header repeated on every page. The CSV is read in your browser and never uploaded.

Drop a CSV or Excel file here

CSV · XLSX · XLS · XLSM · XLSB

or paste your data below

How to convert CSV to PDF

Three steps from attendance.csv to a PDF.

1. Paste or drop the CSV

Paste CSV text or drop a .csv, .tsv or .txt file; the delimiter is detected.

2. Check it in the grid

Count the columns: past six or seven on portrait A4, text starts to wrap a lot. Delete what you don't need or switch to Landscape.

3. Download PDF

Pick Portrait or Landscape and click Download PDF. data.pdf is generated in your browser.

Example: CSV in, PDF out

An attendance log with dates, times and one missing check-out.

attendance.csv
date,name,check_in,check_out
2024-06-03,Maria Rossi,08:55,17:10
2024-06-03,Tom Becker,09:20,
data.pdf (header row printed as the table head)
datenamecheck_incheck_out
2024-06-03Maria Rossi08:5517:10
2024-06-03Tom Becker09:20

Values are printed as text from the grid, so dates and times appear exactly as in the CSV, and Tom Becker's missing check-out stays blank.

What changes between CSV and PDF

Page layout

The table is drawn on A4 pages, portrait or landscape. The header row (date, name, check_in, check_out) is printed as a coloured table head and repeated at the top of every page; body rows are striped.

Text, not an image

Values are printed as text, as they appear in the grid, so the PDF can be searched and copied from. Long values wrap inside their column and widths are set automatically.

CSV values are plain text

CSV has no types, so the grid gets every value exactly as written: 08:55 keeps its leading zero, and the PDF keeps them that way.

When to convert CSV to PDF

CSV to PDF in JavaScript

TabularJS reads the CSV into a 2D array. Then jsPDF and jspdf-autotable, the libraries this page uses, draw the table.

import { writeFile } from 'node:fs/promises';
import tabularjs from 'tabularjs';
import { jsPDF } from 'jspdf';
import { applyPlugin } from 'jspdf-autotable';

// CSV values are strings; the header row stays in data[0]
const { worksheets } = await tabularjs('attendance.csv');
const [header, ...rows] = worksheets[0].data;

applyPlugin(jsPDF); // adds doc.autoTable()
const doc = new jsPDF({ orientation: 'landscape' });
doc.autoTable({ head: [header], body: rows.map((row) => header.map((_, i) => String(row[i] ?? ''))) });
await writeFile('attendance.pdf', Buffer.from(doc.output('arraybuffer')));

TabularJS returns CSV values as strings and leaves the header in data[0]. It does not guess the delimiter: comma is the default, so pass { delimiter: ';' } for semicolon files.

npm install tabularjs MIT licensed

Frequently asked questions

Can I add a title or page numbers?

Not on this page: the PDF contains only the table. To add a title, page numbers or a logo, build the PDF in code with jsPDF, as in the snippet above, and call doc.text() before autoTable.

Can I print only some of the columns?

Delete the other columns in the grid first: the PDF is built from what is in the grid. Your CSV file is not changed.

Can I convert a TSV file?

Yes. Drop the .tsv file or paste its text: tabs in the first line are detected as the delimiter, just like commas or semicolons.

Why do some characters print as gibberish?

The PDF uses the built-in Helvetica font, which only covers Latin-1 (Western European) characters. For other scripts, generate the PDF in code with jsPDF and add a TTF font that contains them.

Does attendance.csv get uploaded when I convert it to PDF?

No. The CSV is read in your browser and never uploaded.