ComfyUI Node: JSON Fixer

Class Name

JSONFixer

Category
🚦ComfyUI_LLMs_Toolkit/JSON
Author
HuangYuChuh (Account age: 42days)
Extension
ComfyUI-LLMs-Toolkit
Latest Updated
2026-04-23
Github Stars
0.02K

How to Install ComfyUI-LLMs-Toolkit

Install this extension via the ComfyUI Manager by searching for ComfyUI-LLMs-Toolkit
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LLMs-Toolkit in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

JSON Fixer Description

Fixes common issues in malformed JSON data from language models, ensuring validity and reliability for further processing.

JSON Fixer:

The JSONFixer node is designed to address and correct common issues found in malformed JSON data, particularly those generated by language models (LLMs). Its primary purpose is to ensure that JSON data, which may be improperly formatted due to various reasons, is corrected and made valid for further processing. This node is particularly beneficial for AI artists and developers who work with JSON data outputs from LLMs, as it automates the correction of typical errors such as trailing commas, incorrect use of quotes, and unquoted keys. By systematically applying a series of checks and fixes, JSONFixer enhances the reliability and usability of JSON data, allowing you to focus on creative tasks without worrying about data integrity issues.

JSON Fixer Input Parameters:

text

The text parameter is a required input that accepts a string containing the raw text expected to include JSON data. This parameter is crucial as it serves as the source material for the JSONFixer node to analyze and attempt to correct. The input text can be in any form, including markdown code blocks or plain text, and the node will extract and fix any JSON content found within. There are no specific minimum or maximum values for this parameter, but it should be a valid string that potentially contains JSON data.

JSON Fixer Output Parameters:

fixed_json

The fixed_json output parameter provides the corrected JSON string if the node successfully fixes the input data. This output is essential as it represents the valid JSON data that can be used in subsequent processes or nodes. If the JSONFixer node cannot correct the input, this parameter will contain an error message detailing the issue, allowing you to understand what went wrong and take further action if necessary.

JSON Fixer Usage Tips:

  • Ensure that the input text is as close to the original LLM output as possible to maximize the chances of successful correction.
  • Use JSONFixer as a preprocessing step before feeding JSON data into other nodes or systems that require valid JSON input.

JSON Fixer Common Errors and Solutions:

Unable to fix JSON: <error_message>

  • Explanation: This error occurs when the JSONFixer node is unable to correct the malformed JSON due to severe formatting issues or unrecognized patterns.
  • Solution: Review the input text for any obvious errors that might be manually corrected, such as unmatched brackets or missing quotes, and try running the node again. If the issue persists, consider simplifying the input or breaking it into smaller parts for individual correction.

JSON Fixer Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LLMs-Toolkit
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

JSON Fixer