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

n8n-nodes-json-sanitizer

v0.1.4

Published

n8n community node for JSON sanitization and normalization

Readme

n8n-nodes-json-sanitizer

This is an n8n community node. It provides a JSON Sanitizer for cleaning and normalizing JSON from various input formats.

The JSON Sanitizer node can handle:

  • JSON strings with BOM (Byte Order Mark)
  • Markdown code fences wrapping JSON
  • Doubly escaped JSON strings
  • Trailing commas
  • JavaScript-style comments (// and /* */)
  • Inconsistent line breaks
  • Already parsed JSON objects
  • Smart Repair: Automatically fixes malformed JSON using the jsonrepair library

Architecture

This project follows a clean layered architecture that separates concerns for better maintainability and testability:

  • Types Layer: Centralized type definitions and interfaces
  • Services Layer: Business logic and n8n integration logic, utilizing the jsonrepair library for advanced JSON repair functionality
  • Configuration Layer: UI properties and node metadata
  • Presentation Layer: Thin n8n integration layer

For detailed architecture documentation, see nodes/JsonSanitizer/README.md.

n8n is a fair-code licensed workflow automation platform.

Installation Operations Credentials Compatibility Usage Resources Version history

Installation

Follow the installation guide in the n8n community nodes documentation.

Operations

The JSON Sanitizer node supports the following operations:

  • Sanitize JSON: Clean and normalize JSON input from various formats
  • Output modes:
    • Parsed Object: Return the parsed JSON object
    • Cleaned String: Return the sanitized JSON string
    • Both: Return both the parsed object and metadata
    • Smart Repair: Automatically fix malformed JSON using advanced repair techniques

Credentials

No credentials required.

Compatibility

  • Minimum n8n version: 1.0.0
  • Tested on n8n 1.x

Dependencies

This node uses the following external dependencies:

  • jsonrepair: A robust JSON repair library for automatically fixing malformed JSON strings

Usage

  1. Add the JSON Sanitizer node to your workflow
  2. Configure the input field containing the JSON data
  3. Choose the desired output mode
  4. Set an output field name
  5. Optionally configure error handling behavior

The node supports dot notation for nested fields (e.g., body.content) and can handle both string and object inputs.

Resources

Version history

  • 0.1.0: Initial release with basic JSON sanitization features
  • 0.1.1: Refactored to clean layered architecture with improved maintainability
  • 0.1.2: Switched to jsonrepair for robust repair; updated tests and improved fallback for unparseable input.
  • 0.1.3: Improved JSON Sanitizer robustness with multi-stage parsing and repair, clearer error diagnostics, and reliable handling of bad control characters and malformed JSON.
  • 0.1.4: Fixed JSON sanitization error caused by overly aggressive comment removal and poor control character handling - URLs with // are now preserved correctly, unescaped control characters are handled gracefully, and malformed JSON repair is more robust