TabularJS vs Papa Parse
Papa Parse(papaparse on npm) is a CSV parser: small, dependency-free, with streaming, Web Workers, header rows as objects, number and boolean typing, and delimiter detection. TabularJS is a spreadsheet reader: one await tabularjs(file) call reads CSV as well as XLSX, XLS, ODS, HTML tables and older formats into the same worksheet shape.
They overlap only on CSV, and for CSV alone Papa Parse does more. Everything on this page was run against papaparse 5.7.0 and tabularjs 2.2.0 on the same test files. Choose by what your users send you: CSV only (especially large CSV) points to Papa Parse; a mix of CSV and spreadsheet files points to TabularJS, or to both.
At a glance
| Feature | Papa Parse | TabularJS |
|---|---|---|
| Formats read | CSV and other delimited text | CSV, TSV, TXT, XLSX, XLS, ODS, HTML tables, XML Spreadsheet 2003, SYLK, DIF, DBF, Lotus 1-2-3, Numbers (experimental) |
| Input | String, File (browser), Readable stream (Node.js), URL with download: true | Path (Node.js), File, Blob, Uint8Array, ArrayBuffer, Buffer, HTML string, DOM element |
| Row output | Array of arrays, or objects with header: true | Array of arrays in worksheets[0].data |
| Header row to objects | Yes (header: true; duplicate names renamed, e.g. a_1) | No: header stays in data, map it yourself |
| Numbers and booleans | Yes (dynamicTyping: true) | No: CSV values are strings |
| Empty cells | '' (null with dynamicTyping) | '' |
| Delimiter | Auto-detected, or delimiter option | Comma unless delimiter option is set; tab for .tsv/.tab |
| Streaming | Yes: step / chunk callbacks, pause, resume, abort | No: whole file in memory |
| Web Worker | Yes (worker: true, browser only) | No |
| Errors | Returned in results.errors, parsing continues | Thrown (or passed to onerror) |
| Writes CSV | Yes (Papa.unparse) | No (read-only) |
| Bundle size (min / gzip) | ~20 KB / ~7 KB | ~199 KB / ~67 KB |
| Runtime dependencies | None | 2 (jszip, @lemonadejs/html-to-json) |
| License | MIT | MIT |
| Latest version | 5.7.0, Aug 24, 2026 | 2.2.0, Oct 29, 2026 |
Bundle size: a one-line entry (import x from 'pkg'; window.x = x;) bundled withesbuild --bundle --minify --platform=browser --format=esm (esbuild 0.28.2), thengzip -9. Measured 19,582 / 7,304 bytes for papaparse and 199,340 / 66,754 bytes for tabularjs.
Same task: uploaded CSV to objects
Papa Parse builds objects from the header row for you. TabularJS returns rows, so you zip the header row yourself. The TabularJS version also accepts an .xlsx,.xls or .ods file without changes.
import Papa from 'papaparse';
input.addEventListener('change', (e) => {
Papa.parse(e.target.files[0], {
header: true,
skipEmptyLines: true,
complete: (results) => render(results.data),
});
});import tabularjs from 'tabularjs';
input.addEventListener('change', async (e) => {
const { worksheets } = await tabularjs(e.target.files[0]);
const [header, ...rows] = worksheets[0].data;
const objects = rows.map((row) =>
Object.fromEntries(header.map((key, i) => [key, row[i]]))
);
render(objects);
});On our test file both produced the same three objects, with every value a string. Without skipEmptyLines, Papa Parse adds a final { Name: '' }object for the trailing newline.
Output for the same file
Name,Born,Married,Kids
"Smith, John",1995-01-01,TRUE,3
Kate Brown,2010-03-01,FALSE,0
Ann Lee,,TRUE,// Papa.parse(csv, { header: true, dynamicTyping: true, skipEmptyLines: true })
{
data: [
{ Name: 'Smith, John', Born: '1995-01-01', Married: true, Kids: 3 },
{ Name: 'Kate Brown', Born: '2010-03-01', Married: false, Kids: 0 },
{ Name: 'Ann Lee', Born: null, Married: true, Kids: null }
],
errors: [],
meta: { delimiter: ',', linebreak: '\n', fields: ['Name', 'Born', 'Married', 'Kids'], ... }
}// (await tabularjs('people.csv')).worksheets[0]
{
data: [
['Name', 'Born', 'Married', 'Kids'],
['Smith, John', '1995-01-01', 'TRUE', '3'],
['Kate Brown', '2010-03-01', 'FALSE', '0'],
['Ann Lee', '', 'TRUE', '']
],
columns: [{ title: 'A' }, { title: 'B' }, { title: 'C' }, { title: 'D' }]
}- Types. With
dynamicTyping, Papa Parse turns"3"into3and"TRUE"intotrue. Dates stay strings in both. TabularJS returns every CSV value as a string. - Header. Papa Parse uses it for object keys and lists it in
meta.fields. TabularJS keeps it asdata[0];columns[i].titleis the column letter. - Metadata. Papa Parse reports the detected delimiter, line break and parse errors. TabularJS gives the worksheet only.
- Typing caveat. Papa Parse's
dynamicTypingturned a ZIP code"01234"into1234; it left a 20-digit number as a string. UsedynamicTypingper column if that matters.
Delimiters
// Papa Parse guesses the delimiter
const results = Papa.parse(text);
results.meta.delimiter; // ';'// TabularJS uses ',' unless told otherwise
const { worksheets } = await tabularjs(file, { delimiter: ';' });
worksheets[0].data[0]; // ['Name', 'City', 'Kids']Without the option, TabularJS read the semicolon file as one column per line (['Name;City;Kids']). If users upload CSV from different locales, Papa Parse saves you a settings field.
Large files: streaming
This is where Papa Parse is clearly the right tool. It can hand you one row at a time, so memory stays flat regardless of file size. TabularJS has no equivalent.
import Papa from 'papaparse';
import fs from 'node:fs';
let count = 0;
Papa.parse(fs.createReadStream('big.csv'), {
header: true,
skipEmptyLines: true,
step: (results) => {
// one row at a time: results.data is { Name: ..., Born: ..., ... }
count++;
},
complete: () => console.log('rows:', count),
});In the browser, Papa.parse(file, { step, worker: true }) streams aFile and parses it off the main thread. Per the Papa Parse README, theworker and download options are not available in Node.js.
When to choose Papa Parse
- Your input is CSV or other delimited text only.
- Files can be large: streaming with
steporchunk, pause and abort, and Web Workers in the browser. - You want objects keyed by header, typed numbers and booleans, and delimiter detection without writing code.
- You also need to write CSV (
Papa.unparse). - Bundle size matters: about 7 KB gzipped, no dependencies.
When to choose TabularJS
- Users upload spreadsheets as well as CSV (XLSX, XLS, ODS, HTML tables, DBF, SYLK, DIF, Lotus 1-2-3), and you want one function and one output shape for all of them.
- File extensions are unreliable: the format is detected from the content when needed, so an
.xlsxsaved as.csvstill reads as a workbook. - You want values exactly as written, with no type guessing (no lost leading zeros).
- You render the data in Jspreadsheet: the result object is the shape
jspreadsheet()takes.
Migration: Papa Parse to TabularJS
If you use header and dynamicTyping on whole files, this reproduces the same objects on our test file. If you rely on step, chunk,worker or delimiter detection, there is nothing to migrate to; keep Papa Parse for CSV.
import tabularjs from 'tabularjs';
// Rough equivalent of Papa's dynamicTyping for CSV strings
const toValue = (s) => {
if (s === '') return null;
if (s === 'TRUE' || s === 'true') return true;
if (s === 'FALSE' || s === 'false') return false;
return s.trim() !== '' && !isNaN(s) ? Number(s) : s;
};
const { worksheets } = await tabularjs(file);
const [header, ...rows] = worksheets[0].data;
const objects = rows.map((row) =>
Object.fromEntries(header.map((key, i) => [key, toValue(row[i])]))
);
// Same objects as Papa.parse(text, { header: true, dynamicTyping: true, skipEmptyLines: true })Frequently asked questions
Can Papa Parse read Excel files?
No. Papa Parse parses CSV and other delimited text. Given an .xlsx file it does not throw: in our test it returned 19 rows of binary text and 17 parse errors. To accept Excel, ODS or other spreadsheet formats you need a different reader, such as TabularJS.
Can TabularJS stream a large CSV?
No. TabularJS reads the whole file into memory and returns all rows at once; it has no step or chunk callbacks and does not accept a Node.js stream. For large CSV files, Papa Parse streaming (step or chunk, File input in the browser, Readable streams in Node.js) is the better tool.
Does TabularJS detect the CSV delimiter?
No. It uses a comma unless you pass the delimiter option, for example { delimiter: ";" }. Files with a .tsv or .tab extension are read as tab-separated. Papa Parse guesses the delimiter from a list of candidates and reports an UndetectableDelimiter error when it cannot decide.
Does TabularJS convert CSV values to numbers and booleans?
No. CSV values come back as strings, and the header row stays as the first row of data. Papa Parse does this with header: true and dynamicTyping: true. Converting yourself takes a few lines, shown in the migration section above.
Which one is smaller?
Papa Parse, by far. Bundled and minified with esbuild for the browser, papaparse came to about 20 KB minified and 7 KB gzipped, with no dependencies. tabularjs came to about 199 KB minified and 67 KB gzipped, because it includes parsers for 16+ formats.
Can I use both?
Yes. A common split is Papa Parse for CSV, where you want streaming and typing, and TabularJS for spreadsheet uploads (XLSX, XLS, ODS and others). Loading tabularjs with a dynamic import() only when a non-CSV file arrives keeps it out of your main bundle.
Can either library write files?
Papa Parse can write CSV with Papa.unparse(), which converts an array of arrays or objects to CSV text. TabularJS is read-only.
How do they handle encodings and the UTF-8 BOM?
Both removed a leading UTF-8 BOM in our test, so the first header was "Name", not "\uFEFFName". TabularJS has an encoding option that accepts TextDecoder labels such as "windows-1252". Papa Parse has an encoding option for File input in the browser and for Node.js streams; for a string you decode it yourself first.
Try it on your own files
Install with npm install tabularjs and read CSV, XLSX, ODS and more with one call.