Go to:   Demo  |  Documentation

Papa Parse


Stop using String.split(',') and let Papa show you how it's done.

Papa is a powerful jQuery plugin that parses CSV (delimited text) input and can handle large files by streaming them.


Parse delimited text strings

Turn CSV text into arrays or objects with one line of code.

var results = $.parse(csvString);
Full documentation

Parse CSV/delimited files

Papa's good at guessing delimiters and dealing with large files, even multiple files at once.

$('input[type=file]').parse({ complete: function(data) { console.log("Parse results:", data.results); } });

Make your web app better

Alleviate privacy concerns and waiting on uploads. Your users would be very happy to know their files don't have to leave their computers.


See Papa in action

Try some of these inputs or use your own to see what Papa can do.

Text: Basic Header Row Numbers Malformed

Files: Basic Header Row Numbers Malformed Big



Input



— or —


(clear)  

Config


  (insert Tab)




Output


<-- (Use the controls on the left to try Papa)


Papa Parse is packed with just the right features

Papa knows lots of useful tricks.


Delimiter detection

Not sure what you're up against? Papa can figure out the delimiting character for you if you don't specify one.

Parse local files directly

Papa can attach to <input type="file"> elements so you can parse them without uploading them to your server or worrying about FileReader boilerplate. Tada!

Gracefully handles errors

Malformed input is robustly recovered where possible, and errors are grouped by row. Papa never serves up results without an error report.

Header row support

For inputs with a header row, Papa can key values by their field names instead of meaningless index numbers. You'd only notice a performance hit with very large inputs.

Stream large files

For large files, stream the parse results to your own callback function, one row at a time. This greatly reduces memory usage. You still get a report of the errors.

Dynamic typing

By default, each value is returned as a string. But Papa can turn numeric data points into numbers. It comes at a slight performance hit, but you'd only notice on large inputs.


Who's your Papa?


Mini Papa for production use
Fat Papa for debug and development

<script src="jquery.papaparse.min.js"></script>

Now get started.

Read the documentation and download Papa for use on your site.