search
format_align_left
JSON Formatter CSS Formatter HTML Formatter JavaScript Formatter XML Formatter SQL Formatter Exception Formatter Markdown Preview & HTML to Markdown
data_object
JSON to Excel/CSV JSON to TypeScript, C#, Go, Java, Kotlin, Python & Dart JSON ⇄ YAML / TOML Converter JSON Diff – Compare Two JSON JSON Viewer & JSONPath Tester
table_chart
Excel/CSV to JSON Excel/CSV to SQL Excel/CSV to HTML
description
Compare text Text to Hex Text to Base64 Case Converter Regex Tester Vietnamese Accent Remover & Slug Generator Number to Words Word Counter Line Tools: Remove Duplicates, Sort Lines Lorem Ipsum Generator
auto_awesome
Fix JSON from ChatGPT, Claude & Gemini Token Counter & AI API Cost Calculator ChatGPT Markdown to Word & Google Docs
image
Convert Image Image to Base64 Converter Image Compressor Resize & Crop Image Favicon Generator Color Palette from Image EXIF Viewer & Remover
qr_code_2
QR Code Generator QR Code Scanner VietQR Bank Transfer QR Generator Wi-Fi QR Code Generator vCard QR Code Generator (Business Card) Barcode Generator (EAN-13, Code 128, Code 39)
lock
Convert Token Convert Hash Generate Password HMAC Generator (SHA-256, SHA-512) AES Encrypt / Decrypt Online Bcrypt Hash Generator & Checker SSH Key Generator (Ed25519 / RSA)
schedule
Convert datetime Timezone Info Vietnamese Lunar Calendar Converter Age Calculator Date Calculator Cron Expression Parser Countdown Timer
payments
Gross to Net Salary Calculator (Vietnam 2026) Vietnam Personal Income Tax Calculator (2026) Loan Calculator – Monthly Payment & Schedule Savings Interest Calculator (Term Deposit) VAT Calculator – Add or Remove VAT
link
Encode and Decode URLs Shorten URL URL Parser & UTM Builder HTTP Header Checker
storage
Statistics Parser Statistics Compare SQL INSERT to JSON Converter SQL Table to C# / TypeScript / Java Class
travel_explore
Create Sitemap robots.txt Generator Meta Tag Generator Open Graph Preview
terminal
Number Base Converter UUID / ULID / NanoID Generator Chmod Calculator HTTP Status Codes
palette
Color Picker
help_outline
About UsPrivacy PolicyTerms of ServiceContact
THUTOOL
search

Fix JSON from ChatGPT, Claude & Gemini

🔒 Processed 100% in your browser – your data never leaves your device

How to fix invalid JSON from ChatGPT, Claude or Gemini

This AI JSON fixer turns the answer of a chatbot into valid JSON you can paste into code. It removes the ```json fence and the sentences around it, then repairs the usual AI mistakes: curly quotes, single quotes, trailing commas, comments, True / None and output that was cut off. Everything runs in your browser.

  1. Copy the whole answer from the chatbot, including any text before or after the JSON.
  2. Paste it into AI answer. The fixed result appears in Valid JSON as you type.
  3. Read the list under the editor to see what was changed.
  4. Click Copy or Download above the result.

Example

Here is it: {“name”: “Mouse”, inStock: True, tags: ['usb',],} becomes {"name": "Mouse", "inStock": true, "tags": ["usb"]}, with a note for each fix.

FAQ

Why does ChatGPT produce broken JSON?
Chat models write text, not data. They add explanations, use typographic quotes, copy Python values like None, or stop in the middle when the answer is long.

How do I stop it from happening?
Ask for "only JSON, no explanation", or use the structured output or JSON mode of the API. This tool cleans up answers from the chat window.

What if the answer contains several JSON blocks?
The first ```json block is used. Paste the other block on its own to fix it.

Related tools

  • Token Counter & AI API Cost CalculatorCount tokens of a prompt with the GPT tokenizer and compare API cost for GPT-5.x, Claude and Gemini models. Runs in your browser.
  • ChatGPT Markdown to Word & Google DocsTurn a ChatGPT, Claude or Gemini answer in Markdown into a formatted Word document: copy with tables and headings for Word or Google Docs, or download .doc.
  • Resize & Crop ImageResize images by pixels or percent, crop to 1:1, 16:9, 4:3 or a free box, rotate and flip. Free and processed 100% in your browser.
  • Vietnamese Lunar Calendar ConverterConvert solar dates to the Vietnamese lunar calendar and back (UTC+7): can chi of day, month and year, leap months and a monthly lunar calendar.
  • Gross to Net Salary Calculator (Vietnam 2026)Convert gross to net salary in Vietnam with 2026 rules: social insurance (BHXH, BHYT, BHTN), personal income tax (5 brackets) and employer cost.
  • URL Parser & UTM BuilderSplit a URL into protocol, host, port, path, query parameters and hash; edit parameters, rebuild the URL and add UTM tags. Runs in your browser.
About UsPrivacy PolicyTerms of ServiceContact
@Made by THUTOOL