CODING · FREE TOOL

XML, JSONC & Go struct converter

Convert well-formed XML to JSON, remove JSON comments, or infer Go structs.

On-device processing · No account · No ads

Files and entered values are processed in your browser, without uploading them to Toolfred. Our tools do not automatically save your work or send it to embedded analytics.

Pages, libraries and shared reference files still download from our host. Downloads you save, browser recovery and hosting logs have separate retention. Local processing is not a guarantee of anonymity or secure deletion.

See where data goes →
Your input and settings

XML: 64 KiB, 5,000 elements, 40 levels; no DTD/custom entities. Qualified names preserved, @ attributes, repeated children become arrays, #text combines mixed text without preserving child/text ordering; comments omitted. JSON/JSONC: 128 KiB; JSONC up to 40 levels. Number spellings and duplicate keys are retained in JSONC output; downstream parsers can handle duplicates differently. Go inference uses the last duplicate key. Go: object root, conservative float64/any inference, ASCII-derived field names, no code execution; inspect before use.

Preparing local controls…

YOUR NEXT STEP

Your converted structure

Choose an operation or example, then process. Nothing is automatically saved.

A worked example

In the XML example, the two item elements become an array. Their id attributes use @id, and their words use #text. JSONC conversion removes comments and trailing commas while retaining the values. Go inference generates declarations for the supplied example, not a schema covering unseen records.

Useful conventions, visible limits.

XML: 64 KiB, 5,000 elements, 40 levels; no DTD/custom entities. Qualified names preserved, @ attributes, repeated children become arrays, #text combines mixed text without preserving child/text ordering; comments omitted. JSON/JSONC: 128 KiB; JSONC up to 40 levels. Number spellings and duplicate keys are retained in JSONC output; downstream parsers can handle duplicates differently. Go inference uses the last duplicate key. Go: object root, conservative float64/any inference, ASCII-derived field names, no code execution; inspect before use.

Processing stays in your browser. There is no account, file upload, analytics, remote lookup or automatic saving. Clear releases the tool’s working references; downloads, clipboard, browser recovery and hosting logs have separate retention. Review outputs before sharing, publishing or importing them.

References: XML 1.0 · Go struct types. Implementation reviewed October 26, 2026.