jsonrepair is a JavaScript utility designed to automatically repair malformed or invalid JSON documents by correcting common syntax and formatting issues. The library is capable of fixing problems such as missing commas, trailing commas, invalid quotes, unescaped characters, incomplete values, comments, and improperly formatted structures while preserving the intended data as accurately as possible. It is especially useful in workflows involving AI-generated content, manually edited configuration files, or unreliable external APIs where malformed JSON frequently occurs. jsonrepair supports both browser and Node.js environments, making it suitable for client-side validation tools and backend processing pipelines alike. The project focuses on automation and fault tolerance, reducing the need for manual cleanup of corrupted JSON data. Its lightweight architecture and practical functionality have made it valuable for modern applications that process unpredictable structured text.

Features

  • Automatic repair of malformed JSON
  • Correction of missing or trailing commas
  • Support for invalid quotes and comments
  • Browser and Node.js compatibility
  • Lightweight and dependency-friendly design
  • Useful for AI-generated structured content

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

MIT License

Follow jsonrepair

jsonrepair Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of jsonrepair!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript JSON Software

Registered

2026-05-07