NexusTools
100% Client-Side

Repair Malformed JSON & Convert to YAML Locally

Heuristically fix single quotes, unquoted dictionary keys, JavaScript comments, and trailing commas. Beautify or minify payload structures instantly with zero API calls.

100% in-browser · no uploadNo loginFree forever

Starting the in-browser processing engine...

Supported: .json, .jsonl, .yaml · Files stay on this device · Drop a file or click to start

100% local processingNo login
Desktop upgrade for this exact workflowPhotonix

Open multi-gigabyte JSONL with Ctrl+K refactors

Photonix streams JSON and JSONL without loading a DOM per line, offers syntax-aware folding, and lets Ctrl+K rewrite a schema or generate a parser script inline.

View product pageDownload for Windows

Refactor in Photonix · Photonix

How it works

How to use it in three steps

Everything happens inside this browser tab. No account, no queue, no upload.

  1. 1Step 1

    Paste broken JSON or a whole file

    The fixer accepts single quotes, trailing commas, comments and unquoted keys, then reports exactly where the remaining syntax error is.

  2. 2Step 2

    Convert between JSON, YAML and JSONL

    YAML output uses two-space indentation and quotes ambiguous scalars. JSONL mode writes one object per line for streaming pipelines.

  3. 3Step 3

    Diff the repaired output

    Send the result to the text diff tool to review what the repair changed, or open large JSONL files in Photonix for line-level search.

Capabilities & limits

Technical details and boundaries

What this utility does well, where its limits are, and when a desktop workflow is the better tool.

What a Safe Repair Can and Cannot Do

JSON5 relaxes the grammar in specific ways: single-quoted strings, unquoted identifier keys, trailing commas, line and block comments, hexadecimal numbers, leading plus signs, and NaN or Infinity. A repair pass should tokenise with string awareness, so a comma inside quotes is never treated as syntax, then rewrite only the constructs it fully understands.

Some damage is repairable and some is guesswork. Removing a trailing comma is deterministic; inserting a missing comma between two properties is usually inferable but not guaranteed. Duplicate keys have no defined winner in the wild, truncated documents cannot be trusted, and a double slash inside an unquoted URL starts a JSON5 comment. Label repairs, and keep the original text.

JSONL, YAML and Structural Differences

JSON Lines stores one value per line, usually an object, with no enclosing array and no commas between records. Blank lines are common and should be skipped; a pretty-printed multi-line object breaks the format. Converting JSONL to an array means inserting commas and brackets without touching the line content, which is straightforward with a streaming reader but memory-hungry with a naive load.

YAML adds indentation semantics, anchors and aliases, merge keys, block scalars and multiple documents separated by three dashes. Tabs are illegal for indentation, and YAML 1.1 treats yes, no and on as booleans while 1.2 does not. Converting YAML to JSON loses comments and anchor identity; JSON to YAML keeps the data but can still change key order when the serialiser sorts them.

Numbers, Escapes and Encoding Traps

JSON numbers are IEEE 754 doubles in every mainstream parser. Integers above 9,007,199,254,740,991 lose precision silently, which corrupts database ids and financial totals. Keep such values as strings, or use a big-int-aware parser. Negative zero serialises as 0, NaN and Infinity are not valid JSON at all, and JSON.stringify turns them into null.

Escaping differs between serialisers: U+2028 and U+2029 are legal inside JSON strings but were illegal in JavaScript source before ES2019, and lone surrogates survive JSON.parse yet break UTF-8 encoders. A BOM at the start is tolerated by some libraries and rejected by others, so strip it on read and never emit it on write.

FAQ

Frequently asked questions

Can JSON contain comments?

Not in the RFC 8259 grammar. Comments belong to JSON5, JSONC and YAML. A converter can strip them safely only if it tracks string state; a naive search for double slashes will destroy URLs inside values.

Why did a large integer change value?

Parsers store numbers as doubles with 53 bits of integer precision. Anything above 9007199254740991 rounds. Store identifiers and money as strings, or choose a parser that preserves big integers.

Is YAML to JSON lossless?

Semantically it can be, but comments, anchors, merge keys and formatting disappear, and keys are coerced to strings. A YAML mapping key that is a number or boolean becomes its JSON string form, which changes lookups in strict code.

What is the difference between JSON and JSONL?

JSON is one document; JSONL is one document per line, which allows streaming and append-only logs. JSONL has no array wrapper and no commas, and a single record containing a raw newline makes the file unreadable.

Continue the workflow

What to do next

Continue the same workflow with another free utility, then hand the result to a desktop app when the file grows.

Further reading

Go deeper

Related tutorials, an honest competitor comparison, and the complete local-sandbox whitepaper.