Processed in your browser

YAML / NDJSON Converter

Built for event logs, bulk imports, and fixtures. YAML array items become compact JSON lines, while every non-blank NDJSON line is parsed independently with a precise error location.

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

Tool guide

What is YAML / NDJSON Converter?

YAML and NDJSON Converter is designed for event logs, bulk imports, and record-oriented fixtures. A YAML root array becomes one compact JSON value per line, while non-blank NDJSON lines are parsed independently into a YAML array with an exact failing line number when a record is damaged. Common workflows include the following. Generate JSON Lines for event streams. Combine line logs into YAML. Locate a damaged batch record. 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

  • Generate JSON Lines for event streams.
  • Combine line logs into YAML.
  • Locate a damaged batch record.

How to use it

  1. Prepare a root YAML array for export.
  2. Keep each NDJSON value on one physical line.
  3. Load the example and compare item counts.
  4. Convert and repair any reported line.
  5. Review blank-line and type handling before copying.
  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

- id: 41
  event: develop
  status: ready
- id: 50
  event: release
  checks: [unit, e2e]

Example 2

{"id":41,"event":"tool development","ok":true}
{"id":50,"event":"production verification","ok":true}

Input rules

  • YAML to NDJSON requires a root array.
  • Every non-blank line must be complete JSON.
  • One record cannot span lines.
  • 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.
  • YAML to NDJSON requires a root array.

Output rules

  • Each array item occupies one line.
  • Blank lines are ignored.
  • Imported output is a YAML array.
  • Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
  • Every non-blank line must be one complete JSON value.

Limitations and cautions

  • YAML to NDJSON requires a root array.
  • Every non-blank line must be one complete JSON value.
  • Comments, anchors, and multiline JSON records are unsupported.

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 YAML 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 identifies the areas that require review.

Why can valid input still be rejected?

The destination may not have a safe representation. Dangerous keys, unsafe integers, excessive depth, and ambiguous mappings are rejected instead of silently rewritten.

Can a line contain a scalar?

Yes. Each non-blank line can hold any complete JSON value.

How are blank lines handled?

They are ignored and do not produce null items.

Can one object span lines?

No. NDJSON requires one complete value per physical line.

Updated: 2026-08-09