跳转到主要内容
CuteJSON
↑↓ 导航 Enter 选择 Esc 关闭

JSON to YAML Converter

Convert between JSON and YAML without either document leaving your browser.

返回所有工具

键盘快捷键

这些快捷键在页面上对应操作存在时有效。

打开命令面板
Ctrl/Cmd + K
运行主要操作
Ctrl/Cmd + Enter
格式化
Ctrl/Cmd + Shift + F
压缩
Ctrl/Cmd + Shift + M
复制输出
Ctrl/Cmd + Shift + C
打开文件
Ctrl/Cmd + Shift + O
下载输出
Ctrl/Cmd + S
关闭此对话框
Esc
打开此对话框
F1 / ?

本地数据

以下所有内容仅存储在此浏览器、此设备上。

未保存的草稿
记住选项的工具

最近打开的文件

    此设备上尚未打开任何文件。

    通过链接分享

    内容被打包在链接 # 号之后的部分。

    分享此页面上的第一个输入。

    暂无可分享的内容。

    JSON

    从 URL 加载

    直接从浏览器获取 URL。

    YAML

    结果将显示在此处。

    完全在您的浏览器中运行。

    关于此工具

    YAML is a larger language than JSON, so this converts the subset that JSON can hold and refuses the rest by name rather than mangling it. Writing, a mapping becomes one key per line and an array repeats its key or dash per item, a string is quoted only when it would otherwise read as a number, a boolean, a null or a YAML indicator, and a null becomes a key with no value; an array can also be written as its own multi-document stream, one --- separated document per element, instead of one sequence, an explicit choice rather than the default, since an ordinary array gives no signal on its own for which reading was meant. Reading, a mapping, a sequence, a quoted string, a block scalar, a flow collection and a folded plain scalar are all read, an anchor and the aliases that point at it are resolved by copying the anchored value to every place that refers to it, and a stream of more than one --- separated document comes back as a JSON array, one element per document; tags and complex mapping keys are still refused by name. A plain scalar folds across the more indented lines that belong to it, and a line that turns out to open a block instead is refused rather than swallowed, because YAML cannot continue a plain scalar with an indicator. Numbers travel through the token stream, so a twenty digit integer comes back with all twenty digits, anchored or not.

    使用方法

    1. Choose a direction, then paste your document into the left pane or load the sample.
    2. Pick the indent width, then press Convert.
    3. Copy the result or download it as a file.