An open-source alternative to Flatfile and OneSchema
Hosted importers such as Flatfile, OneSchema, CSVbox, Dromo and UseCSV give your users a finished "upload a spreadsheet" flow. If you would rather keep the file in the browser, pay no per-import fees and own the code, you can build the same flow from MIT-licensed parts: TabularJS reads the file, Jspreadsheet CE lets the user review and fix rows, and your code validates and sends JSON to your backend.
The hosted importers
What each service says it does, from its own website, and pricing exactly as listed on its pricing page on 2026-10-29. Prices change; check the linked page before you decide.
| Service | What it does | Pricing (as listed on 2026-10-29) |
|---|---|---|
| Flatfile | Data preparation and import platform: "prepare, map, clean, transform, and validate" data, with AI-powered mapping to a destination schema. The docs cover embedding it in JavaScript, React, Angular and Vue apps. Its site says the company has been renamed Obvious. | No prices on the pricing page; "Talk to sales". Source |
| OneSchema | An embeddable importer ("Launch CSV import in minutes"), AI mapping of files to a target structure, and validation templates, alongside AI data-operations products. | Importer plans list no prices ("Contact us" / "Request a demo"); row limits such as "Up to 1M row spreadsheets" are listed. Source |
| CSVbox | An embeddable import widget for CSV and Excel files with "AI-powered fuzzy matching" of headers, built-in and custom JavaScript validation, and delivery to your webhook, API or database. | Sandbox $0/mo (100 imports per month, up to 5 rows per import); paid plans from $16/mo billed yearly. Source |
| Dromo | An embedded importer for CSV, XLS, XLSX and TSV files that "uses GPT to automatically map imported columns". It offers a Private mode that runs entirely in the browser, bring-your-own storage and self-hosting. | Professional $599/month with 250 imports included, then $3 per import; Enterprise is custom. Source |
| UseCSV | A drop-in importer modal for CSV, TSV and Excel files with automatic column matching, validation rules (built-in or custom JavaScript), "data healing" and an option to keep data local. | Hobby free (50 file imports/month, 10,000 rows per upload); Starter $49/mo, Plus $99/mo, Pro $199/mo. Source |
The build-it-yourself stack
- TabularJS (MIT) reads the uploaded file in the browser: XLSX, XLS, ODS, CSV, TSV, TXT, HTML tables, XML 2003, SYLK, DIF, DBF and Lotus. The file is not uploaded anywhere.
- Jspreadsheet CE (MIT) shows the rows as an editable grid so the user can review and fix them.Jspreadsheet Pro is the commercial edition with more features; it is not needed here.
- Your code maps the header row to your field names, validates each cell, highlights the bad ones and posts clean JSON to your API.
TabularJS output is already in the shape Jspreadsheet expects, so a raw preview of any file is one call (see the Jspreadsheet CE example):
import jspreadsheet from 'jspreadsheet-ce';
import tabularjs from 'tabularjs';
input.addEventListener('change', async (e) => {
const result = await tabularjs(e.target.files[0]);
jspreadsheet(document.getElementById('sheet'), result);
});An importer needs more than a preview: your field names, a mapping step and validation. That is the code below.
Build it: file input to validated JSON
The importer below expects three fields: name (required), email(required, must look like an email) and age (optional, must be a number). It reads the first worksheet, treats its first row as the header row, preselects matching columns, shows the mapped rows in a grid, turns invalid cells red with a comment explaining why, and enables the Import button only when every cell passes.
1. Install
npm install tabularjs jspreadsheet-ce jsuites2. Markup
<input type="file" id="file" accept=".xlsx,.xls,.ods,.csv,.tsv,.txt" />
<div id="mapping"></div>
<button id="review">Review rows</button>
<div id="grid"></div>
<p id="status"></p>
<button id="submit" disabled>Import</button>
<script type="module" src="./importer.js"></script>3. The importer
import tabularjs from 'tabularjs';
import jspreadsheet from 'jspreadsheet-ce';
import 'jsuites/dist/jsuites.css';
import 'jspreadsheet-ce/dist/jspreadsheet.css';
// 1. The fields your backend expects
const FIELDS = [
{ key: 'name', label: 'Full name', required: true },
{ key: 'email', label: 'Email', required: true, type: 'email' },
{ key: 'age', label: 'Age', type: 'number' },
];
const $ = (id) => document.getElementById(id);
const escapeHtml = (s) =>
String(s).replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`);
let headers = [];
let body = [];
let grid = null;
// 2. Read the file in the browser. Nothing is uploaded at this point.
$('file').addEventListener('change', async (e) => {
const result = await tabularjs(e.target.files[0]);
const rows = result.worksheets[0].data;
headers = rows[0].map((h) => String(h ?? '').trim());
body = rows.slice(1).filter((r) => r.some((v) => v !== '' && v != null));
renderMapping();
});
// 3. Column mapping: one <select> per field, preselected by header name
const normalize = (s) => String(s).toLowerCase().replace(/[^a-z0-9]/g, '');
function renderMapping() {
$('mapping').innerHTML = FIELDS.map((f) => {
const guess = headers.findIndex(
(h) => normalize(h) === normalize(f.key) || normalize(h) === normalize(f.label)
);
const options = headers
.map((h, i) => `<option value="${i}"${i === guess ? ' selected' : ''}>${escapeHtml(h)}</option>`)
.join('');
return `<label>${f.label}${f.required ? ' *' : ''}
<select data-field="${f.key}"><option value="-1">(skip)</option>${options}</select>
</label>`;
}).join('');
}
// 4. Put the mapped rows in an editable grid so the user can fix them
$('review').addEventListener('click', () => {
const map = {};
document.querySelectorAll('#mapping select').forEach((s) => {
map[s.dataset.field] = Number(s.value);
});
const data = body.map((row) =>
FIELDS.map((f) => (map[f.key] >= 0 ? row[map[f.key]] ?? '' : ''))
);
if (grid) jspreadsheet.destroy($('grid'));
grid = jspreadsheet($('grid'), {
worksheets: [{ data, columns: FIELDS.map((f) => ({ title: f.label, width: 200 })) }],
onchange: () => validate(),
})[0];
validate();
});
// 5. Validation: required, email, number. Bad cells turn red with a comment.
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
function checkCell(field, value) {
const v = String(value ?? '').trim();
if (v === '') return field.required ? 'Required' : null;
if (v.startsWith('=')) return 'Formula, not a value';
if (field.type === 'email' && !EMAIL.test(v)) return 'Not a valid email';
if (field.type === 'number' && !Number.isFinite(Number(v))) return 'Not a number';
return null;
}
function validate() {
const data = grid.getData(false, true);
const cells = {};
const bad = {};
const comments = {};
data.forEach((row, y) => {
FIELDS.forEach((f, x) => {
const name = jspreadsheet.helpers.getCellNameFromCoords(x, y);
const msg = checkCell(f, row[x]);
cells[name] = '';
comments[name] = msg || '';
if (msg) bad[name] = 'background-color: #fde2e2';
});
});
grid.resetStyle(cells);
grid.setStyle(bad);
grid.setComments(comments);
const errors = Object.keys(bad).length;
$('status').textContent = errors ? `${errors} cell(s) need fixing` : `${data.length} rows ready`;
$('submit').disabled = errors > 0;
return errors;
}
// 6. Send clean JSON to your backend (validate again on the server)
$('submit').addEventListener('click', async () => {
if (validate() > 0) return;
const records = grid.getData(false, true).map((row) =>
Object.fromEntries(
FIELDS.map((f, x) => {
const v = String(row[x] ?? '').trim();
return [f.key, f.type === 'number' ? (v === '' ? null : Number(v)) : v];
})
)
);
const res = await fetch('/api/import', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(records),
});
$('status').textContent = res.ok ? `Imported ${records.length} rows` : `Import failed (${res.status})`;
});Notes on the data you get
- The header row is not removed for you: it is
data[0]for CSV and Excel files alike, which is why the code slices it off.columns[i].titleholds column letters (A, B, C), not your headers. - CSV values are strings; .xlsx numbers are numbers. The checks convert with
String()andNumber(), so both work. - Formulas arrive as text (
=SUM(A2:A9)) and are never evaluated. The example rejects them; ask users to paste values instead. - .xlsx dates arrive as Excel serial numbers. If you add a date field, convert them:
// .xlsx dates arrive as Excel serial numbers (1900 date system)
const toDate = (serial) => new Date(Math.round((serial - 25569) * 86400000));
toDate(46037).toISOString(); // '2026-01-15T00:00:00.000Z'Validate again on the server: the browser checks are for the user's convenience, not for security. For very large files, keep in mind that everything is parsed in memory in the user's browser.
Trade-offs, honestly
| Hosted importer | TabularJS + Jspreadsheet CE | |
|---|---|---|
| Column mapping UI | Built in, usually with AI or fuzzy matching | You build it (a <select> per field in the example below) |
| Validation rules | Rule builders, custom hooks, data cleanup | Plain JavaScript functions you write and test |
| Review and fix rows | Built in | Jspreadsheet grid with highlighted cells and comments |
| Where the file is parsed | Depends on the vendor and plan; Dromo and UseCSV list in-browser or local options | In the user's browser; only your JSON reaches your backend |
| Cost | Subscription and/or per-import pricing, or sales quote | No per-import fees; MIT libraries; your development time |
| Support and maintenance | Vendor support and maintenance | Your team owns the code |
| Control | Limited to the vendor's configuration options | Full control over UI, rules and data flow |
Pick a hosted importer if
- You want AI column matching and a polished mapping UI without building one.
- Non-developers need to edit validation rules.
- You want vendor support and someone else maintaining the importer.
Build it yourself if
- Files must stay in the browser and never reach a third party.
- Import volume makes per-import or per-seat pricing expensive.
- You want full control over the UI, the rules and the data flow.
- Expect to write and maintain the mapping and validation code yourself.
FAQ
Is there an open-source alternative to Flatfile?
There is no drop-in open-source clone, but you can build the same flow from MIT-licensed parts: TabularJS reads the uploaded spreadsheet in the browser, Jspreadsheet CE shows the rows in an editable grid, and your own code maps columns, validates and posts JSON to your backend. The example on this page is about 120 lines.
Does the uploaded file leave the browser?
Not in the approach shown here. TabularJS parses the file in the browser and nothing is sent until your code posts the validated JSON to your own endpoint. Some hosted importers also offer in-browser or self-hosted modes, for example Dromo Private mode and the UseCSV option to keep data local.
Which file formats can users upload?
TabularJS reads XLSX, XLS, ODS, CSV, TSV, TXT, HTML tables, XML Spreadsheet 2003, SYLK, DIF, DBF and Lotus 1-2-3 files with the same call, so the importer accepts all of them without extra code.
How do I map spreadsheet columns to my field names?
Read the header row from result.worksheets[0].data[0], show one select per field listing those headers, and preselect a header when its normalized name matches the field. Then build each record from the chosen column indexes.
What do hosted importers give me that this does not?
A finished mapping UI, AI or fuzzy column matching, rule builders for non-developers, data cleanup helpers, localization, vendor support and maintenance. If those matter more than control and cost, a hosted importer can be the better choice.
Do I still need server-side validation?
Yes. Browser validation helps users fix their data, but anyone can call your endpoint directly, so check the same rules again on the server before saving.
Is Jspreadsheet free?
Jspreadsheet CE is MIT licensed and free. Jspreadsheet Pro is a commercial product with extra features. The importer on this page uses only Jspreadsheet CE.
Start with the parser
TabularJS is MIT licensed, runs in the browser and Node, and reads 16+ spreadsheet formats into one JSON shape.