Alternatives

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

FeaturePapa ParseTabularJS
Formats readCSV and other delimited textCSV, TSV, TXT, XLSX, XLS, ODS, HTML tables, XML Spreadsheet 2003, SYLK, DIF, DBF, Lotus 1-2-3, Numbers (experimental)
InputString, File (browser), Readable stream (Node.js), URL with download: truePath (Node.js), File, Blob, Uint8Array, ArrayBuffer, Buffer, HTML string, DOM element
Row outputArray of arrays, or objects with header: trueArray of arrays in worksheets[0].data
Header row to objectsYes (header: true; duplicate names renamed, e.g. a_1)No: header stays in data, map it yourself
Numbers and booleansYes (dynamicTyping: true)No: CSV values are strings
Empty cells'' (null with dynamicTyping)''
DelimiterAuto-detected, or delimiter optionComma unless delimiter option is set; tab for .tsv/.tab
StreamingYes: step / chunk callbacks, pause, resume, abortNo: whole file in memory
Web WorkerYes (worker: true, browser only)No
ErrorsReturned in results.errors, parsing continuesThrown (or passed to onerror)
Writes CSVYes (Papa.unparse)No (read-only)
Bundle size (min / gzip)~20 KB / ~7 KB~199 KB / ~67 KB
Runtime dependenciesNone2 (jszip, @lemonadejs/html-to-json)
LicenseMITMIT
Latest version5.7.0, Aug 24, 20262.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.

papaparse.jsjs
import Papa from 'papaparse';

input.addEventListener('change', (e) => {
    Papa.parse(e.target.files[0], {
        header: true,
        skipEmptyLines: true,
        complete: (results) => render(results.data),
    });
});
tabularjs.jsjs
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

people.csvcsv
Name,Born,Married,Kids
"Smith, John",1995-01-01,TRUE,3
Kate Brown,2010-03-01,FALSE,0
Ann Lee,,TRUE,
papaparse outputjs
// 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'], ... }
}
tabularjs outputjs
// (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' }]
}

Delimiters

papaparse.jsjs
// Papa Parse guesses the delimiter
const results = Papa.parse(text);
results.meta.delimiter; // ';'
tabularjs.jsjs
// 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.

stream.jsjs
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

When to choose TabularJS

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.

tabularjs.jsjs
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.