Withdata Software

Convert XML to JSON lines (JSONL / NDJSON / LDJSON)

Want to convert XML to JSON lines (JSONL / NDJSON / LDJSON)?

Try Withdata Data File Converter, a desktop XML to JSON converter for Windows, MacOS, and Linux, Convert XML to JSON lines, Easy and Fast.

Download DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit

JSON Lines text format (JSONL), also called Newline-delimited JSON (NDJSON), or Line-delimited JSON (LDJSON). JSON Lines files may be saved with the file extension .jsonl, *.ndjson, *.ldjson.

Convert XML to JSON lines (JSONL / NDJSON / LDJSON)

Choose XML file -> Set target JSON Lines (JSONL / NDJSON / LDJSON) file -> Convert XML to JSON lines (JSONL / NDJSON / LDJSON)

Click “Start a New Convert” at task dialog.

then show the wizard.

Select source/target file type.

1. Open a XML file.

The XML content:

2. Config target JSON Lines (JSONL / NDJSON / LDJSON) file.

3. Set rows options.

4. Convert XML to JSON lines (JSONL / NDJSON / LDJSON).

See JSON lines file

Convert XML to JSON lines (JSONL / NDJSON / LDJSON) in command line

Save “XML to JSON Lines” session, then you can:

Set scheduled tasks for converting XML to JSON lines (JSONL / NDJSON / LDJSON)

You can schedule and automate this converting task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “XML to JSON lines” conversion.
  2. Set scheduled task for “XML to JSON lines” conversion.

FAQ

What is Withdata DataFileConverter?
Withdata DataFileConverter is a data file format converter, it can convert XML to JSON lines (JSONL /NDJSON /LDJSON). Download Withdata DataFileConverter
How long does it take to convert XML to JSON lines?
DataFileConverter works fast. It convert millions of rows within a minute.
Is it safe to convert XML to JSON lines using DataFileConverter?
Of course! DataFileConverter convert XML to JSON lines privately, absolutely safe.
Can I convert XML to JSON lines on Linux, Mac OS?
Yes, you can. DataFileConverter has Linux, Mac OS, and Windows version.
Can I convert XML to JSON lines in command line?
Yes, you can. DataFileConverter can running in command line, on Linux, Mac OS, and Windows.

More tools for JSONL / NDJSON / LDJSON.

XML → JSON Lines reference

Type mapping

Value kindin XMLin JSON Lines
Int<int>1234</int>1234 (number)
Bigint<bigint>9007199254740993</bigint>9007199254740993
Decimal<decimal>1234.56</decimal>1234.56 (number)
Float<float>1.234e10</float>1.234e10 (number)
Text<char>text</char>"text" (string)
Long text<text>multi-line text</text> (entities for &amp; &lt;)"multi-line\ntext"
Date<date>2026-09-18</date> (xs:date with an XSD)"2026-09-18" (string)
Datetime<datetime>2026-09-18T14:30:00Z</datetime> (xs:dateTime)"2026-09-18T14:30:00Z" (string)
Binary<blob>base64...</blob> (xs:base64Binary)"base64:..." (string)
Boolean<bool>true</bool>true / false (boolean)
JSONescaped inside an element, or its own sub-treenested object on the same line

Dialect differences

Both XML and JSON Lines are file formats, so what differs below is how each one chooses to represent a value.

Propertyin XMLin JSON Lines
identifiersAttribute values in quotes; entities (&amp; &lt; &gt;) for ...Double quotes; backslash escapes (a newline inside a string...
datesText (xs:date / xs:dateTime when an XSD is in play)No date type: dates arrive as strings
binarybase64Binary / hexBinary inside textNot supported natively - base64 inside a string
separatorTags, not delimitersNewline between records
encodingDeclared in the XML declarationUTF-8 by definition
typingNone in the markup itselfSame as JSON, but records cannot nest across lines
shapeArbitrary treeFlat stream
ceilingWhole document is usually parsed into memoryStreams, so it scales past what a single JSON document can ...

Data File Converter without the manual work

For batch jobs, large files and scheduling use the Data File Converter converter — an offline desktop app for Windows, Linux and macOS. Free trial.