Processed in your browser

XML / NDJSON Converter

The XML root must contain one repeated row element, with each row becoming one NDJSON record. Reverse conversion deliberately emits rows/row instead of guessing element names.

Processed in your browser
0 / 1,000,000
Converted output

Tool guide

What is XML / NDJSON Converter?

XML and NDJSON Converter handles event logs, bulk records, and streaming fixtures. The XML root must contain one repeated row element, with every row becoming one compact JSON value. NDJSON is parsed line by line and always generates rows/row XML, with exact line numbers for damaged records. Common workflows include the following. Export repeated XML events as JSON Lines. Generate stable XML from bulk records. Locate one damaged record line. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.

When to use it

  • Export repeated XML events as JSON Lines.
  • Generate stable XML from bulk records.
  • Locate one damaged record line.

How to use it

  1. Prepare one repeated row element for XML.
  2. Keep each NDJSON record on one line.
  3. Load both examples and compare record counts.
  4. Convert and repair the reported line.
  5. Review the fixed rows/row output structure.
  6. Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.

Runnable examples

The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.

Example 1

<events><event><id>51</id><status>develop</status></event><event><id>60</id><status>ready</status></event></events>

Example 2

{"id":51,"name":"XML INI","status":"complete"}
{"id":60,"name":"CSV Properties","status":"verified"}

Input rules

  • The XML root must contain one repeated row type.
  • Each non-blank NDJSON line must be complete JSON.
  • DTD, ENTITY, and mixed content are unsupported.
  • Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
  • The XML root must contain one repeated row element type.

Output rules

  • Each XML row becomes one record.
  • Blank NDJSON lines are ignored.
  • Reverse output always uses rows/row.
  • Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
  • Each non-blank NDJSON line must be complete JSON.

Limitations and cautions

  • The XML root must contain one repeated row element type.
  • Each non-blank NDJSON line must be complete JSON.
  • Reverse output uses rows/row and does not restore the original names.

How your data is handled

All parsing, format conversion, Base64 work, and intermediate data remain in the current browser tab. JSONLane does not upload the input or retain it after refresh or close.

FAQ

Is XML or NDJSON content uploaded?

No. Parsing, conversion, and output generation remain in the current browser tab.

Is every round trip lossless?

No. Comments, layout, type systems, and binary capabilities differ, so the page lists areas that require review.

Why can valid input still be rejected?

The destination may not have a safe, unambiguous representation. Dangerous keys, unsafe integers, excess depth, and ambiguous mappings are rejected.

Why must XML contain repeated rows?

NDJSON is a record stream, and repeated rows define one record boundary clearly.

Are scalar NDJSON lines supported?

They can parse, but XML generation still requires each record to map safely into row content.

Is the original root name retained?

No. NDJSON carries no root name, so reverse output uses rows/row.

Updated: 2026-08-09