npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@digitalnodecom/node-red-contrib-papaparse

v1.0.0

Published

A Node-RED node that uses PapaParse for CSV parsing and unparsing with enhanced features and performance

Readme

node-red-contrib-papaparse

A Node-RED node that uses PapaParse for CSV parsing and unparsing with enhanced features and performance compared to the built-in CSV parser in Node-RED.

Installation

You can install this node directly from the Node-RED palette manager, or run the following command in your Node-RED user directory (typically ~/.node-red):

npm install node-red-contrib-papaparse

Features

  • Better Performance: PapaParse is optimized for speed and can handle large CSV files efficiently.
  • More Options: Provides more configuration options than the built-in CSV parser.
  • Dynamic Typing: Automatically converts numeric and boolean values to their respective types.
  • Header Row Support: Can use the first row as field names.
  • Error Handling: Provides detailed error information when parsing fails.
  • Metadata: Includes metadata about the parsing process in the output.
  • Bidirectional Conversion: Includes nodes for both CSV-to-JSON parsing and JSON-to-CSV unparsing.
  • Smart Input Handling: The unparsing node can automatically detect and parse JSON strings, making it easy to use with file nodes.

Nodes

This package provides two nodes:

1. papaparse (CSV to JSON)

Converts CSV data to JSON format.

Usage

  1. Add the PapaParse node to your flow.
  2. Configure the node according to your CSV format.
  3. Send a message with the CSV data in the msg.payload property.
  4. The node will output a message with the parsed data in the msg.payload property and metadata in the msg.meta property.

Configuration Options

  • Header Row: If checked, the first row of the CSV will be treated as field names.
  • Skip Empty Lines: If checked, empty lines will be skipped.
  • Dynamic Typing: If checked, numeric and boolean values will be converted to their respective types.
  • Delimiter: The character used to separate values. Leave empty for auto-detection.
  • Newline: The character used for line breaks. Leave empty for auto-detection.
  • Quote Char: The character used to quote fields.
  • Escape Char: The character used to escape special characters.
  • Comments: If checked, lines starting with the comment character will be skipped.
  • Fast Mode: If checked, certain optimizations will be enabled at the expense of some features.

2. papaunparse (JSON to CSV)

Converts JSON data to CSV format.

Usage

  1. Add the PapaUnparse node to your flow.
  2. Configure the node according to your desired CSV format.
  3. Send a message with the JSON data in the msg.payload property. This can be:
    • An array of objects or an array of arrays
    • A JSON string containing an array (will be automatically parsed)
  4. The node will output a message with the CSV string in the msg.payload property.

Configuration Options

  • Include Headers: If checked, field names will be included as the first row of the CSV.
  • Skip Empty Lines: If checked, empty lines will be skipped.
  • Delimiter: The character used to separate values. Leave empty for default (,).
  • Newline: The character used for line breaks. Leave empty for default (\n).
  • Quote Char: The character used to quote fields.
  • Escape Char: The character used to escape special characters.
  • Columns: Optional comma-separated list of columns to include in the output. If not specified, all columns will be included.

Example Flows

CSV to JSON Example

[
    {
        "id": "f6f2187d.f17ca8",
        "type": "inject",
        "z": "2b9467c1.b7c8c8",
        "name": "Sample CSV",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "name,age,city\nJohn,30,New York\nJane,25,San Francisco\nBob,40,Chicago",
        "payloadType": "str",
        "x": 140,
        "y": 120,
        "wires": [
            [
                "a7f4d89d.cb4b58"
            ]
        ]
    },
    {
        "id": "a7f4d89d.cb4b58",
        "type": "papaparse",
        "z": "2b9467c1.b7c8c8",
        "name": "",
        "header": true,
        "skipEmptyLines": true,
        "dynamicTyping": true,
        "delimiter": "",
        "newline": "",
        "quoteChar": "\"",
        "escapeChar": "\"",
        "comments": false,
        "fastMode": false,
        "x": 320,
        "y": 120,
        "wires": [
            [
                "8f347a9a.41c7b8"
            ]
        ]
    },
    {
        "id": "8f347a9a.41c7b8",
        "type": "debug",
        "z": "2b9467c1.b7c8c8",
        "name": "Parsed CSV",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 500,
        "y": 120,
        "wires": []
    }
]

JSON to CSV Example

[
    {
        "id": "e5f2187d.f17ca8",
        "type": "inject",
        "z": "2b9467c1.b7c8c8",
        "name": "Sample JSON",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "[{\"name\":\"John\",\"age\":30,\"city\":\"New York\"},{\"name\":\"Jane\",\"age\":25,\"city\":\"San Francisco\"},{\"name\":\"Bob\",\"age\":40,\"city\":\"Chicago\"}]",
        "payloadType": "json",
        "x": 140,
        "y": 220,
        "wires": [
            [
                "b7f4d89d.cb4b58"
            ]
        ]
    },
    {
        "id": "b7f4d89d.cb4b58",
        "type": "papaunparse",
        "z": "2b9467c1.b7c8c8",
        "name": "",
        "header": true,
        "skipEmptyLines": true,
        "delimiter": "",
        "newline": "",
        "quoteChar": "\"",
        "escapeChar": "\"",
        "columns": "",
        "x": 330,
        "y": 220,
        "wires": [
            [
                "9f347a9a.41c7b8"
            ]
        ]
    },
    {
        "id": "9f347a9a.41c7b8",
        "type": "debug",
        "z": "2b9467c1.b7c8c8",
        "name": "CSV Output",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 500,
        "y": 220,
        "wires": []
    }
]

Reading JSON File and Converting to CSV

[
    {
        "id": "c3f2187d.f17ca8",
        "type": "file in",
        "z": "2b9467c1.b7c8c8",
        "name": "Read JSON File",
        "filename": "data.json",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "x": 140,
        "y": 320,
        "wires": [
            [
                "d7f4d89d.cb4b58"
            ]
        ]
    },
    {
        "id": "d7f4d89d.cb4b58",
        "type": "papaunparse",
        "z": "2b9467c1.b7c8c8",
        "name": "",
        "header": true,
        "skipEmptyLines": true,
        "delimiter": ",",
        "newline": "",
        "quoteChar": "\"",
        "escapeChar": "\"",
        "columns": "",
        "x": 330,
        "y": 320,
        "wires": [
            [
                "e9347a9a.41c7b8"
            ]
        ]
    },
    {
        "id": "e9347a9a.41c7b8",
        "type": "file",
        "z": "2b9467c1.b7c8c8",
        "name": "Write CSV File",
        "filename": "data.csv",
        "appendNewline": false,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 500,
        "y": 320,
        "wires": []
    }
]

License

ISC