jsonlkit.com
JSONL (JSON Lines) utilities, in the browser
Say hi →

JSONL ⇄ XML Converter

updated 16 May 2026

JSONL to XML converter. Turn each JSONL record into an XML element, or parse XML back to JSONL. Configurable root and item tag names. Browser-only.

100% client-side. No upload.

Convert

Drop a .jsonl, .ndjson, or .xml file here, or

JSONL ↔ XML Converter

Turn a JSONL stream into a single XML document where each record becomes an element under a configurable root, or parse XML back into one JSON object per line. Useful for handing data to legacy SOAP / RSS / DocBook pipelines, or for ingesting XML feeds into JSON-first systems. 100% in-browser.

How it works

JSONL → XML wraps the whole file in a configurable root element (default <records>). Each JSON object becomes an item element (default <record>), with its keys as child elements. Nested objects become nested elements; arrays become repeated elements with the same tag name.

XML → JSONL uses the browser's built-in DOMParser. Each child of the root becomes one JSON object on its own line. Repeated child tags collapse into arrays automatically. Attributes are emitted as @name keys; text content as #text.

Tips & common pitfalls

Example

Input JSONL:

{"id":1,"name":"alice","tags":["a","b"]}
{"id":2,"name":"bob","tags":["c"]}

Output XML:

<?xml version="1.0" encoding="UTF-8"?>
<records>
  <record>
    <id>1</id>
    <name>alice</name>
    <tags>a</tags>
    <tags>b</tags>
  </record>
  <record>
    <id>2</id>
    <name>bob</name>
    <tags>c</tags>
  </record>
</records>

Related tools