TsWorks Tools
All tools (39)

YAML to JavaScript

Convert YAML data into JavaScript in your browser.

Indent

Several documents come out as an array.

Paste YAML. Anchors, multi-line scalars and multi-document streams all work.

YAML to JavaScript

Paste data or open a local file, then copy or download the converted result. Everything runs in your browser.

JavaScript objects as data

JavaScript output uses object literals with unquoted identifier keys. Input accepts objects and arrays, single or double quoted strings, comments, trailing commas, and an optional const declaration or export default. Functions, expressions, and executable code are rejected and never executed.

Type definitions and other formats

TypeScript definitions describe the supplied values. CSV represents rows; nested objects can be flattened. Use the format dropdowns to continue working with the same input.