Back to Papaparse

Choose a Demo

docs/demo.html

5.4.11.6 KB
Original Source

Choose a Demo

String

Local File(s)

Remote File

JSON to CSV

Stream Results are delivered row by row to a step function. Use with large inputs that would crash the browser. Worker thread Uses a separate thread so the web page doesn't lock up. Header row Keys data by field name rather than an array. Dynamic typing Turns numeric data into numbers and true/false into booleans. Skip empty lines By default, empty lines are parsed; check to skip.

Delimiter:tabThe delimiting character. Usually comma or tab. Default is comma. Preview:If > 0, stops parsing after this many rows. Encoding:Only applies when reading local files. Default is specified by the browser (usually UTF-8). Comment char:If specified, skips lines starting with this string.

Column 1,Column 2,Column 3,Column 4 1-1,1-2,1-3,1-4 2-1,2-2,2-3,2-4 3-1,3-2,3-3,3-4 4,5,6,7

Choose one or more delimited text files for Papa to parse. Sample files:

Type the URL of the file to be downloaded and parsed.
(cross-origin requests require Access-Control-Allow-Origin header) Sample files:

[{ "Column 1": "1-1", "Column 2": "1-2", "Column 3": "1-3", "Column 4": "1-4" }, { "Column 1": "2-1", "Column 2": "2-2", "Column 3": "2-3", "Column 4": "2-4" }, { "Column 1": "3-1", "Column 2": "3-2", "Column 3": "3-3", "Column 4": "3-4" }, { "Column 1": 4, "Column 2": 5, "Column 3": 6, "Column 4": 7 }]

Results will appear in the console of your browser's inspector tools Parse