YAML 轉 JSON 工具
在你的瀏覽器中將 YAML 轉換為 JSON。支援巢狀對應、清單、字串、數字和布林值。
如何使用本工具
- 1
Paste or type your YAML into the input box, using spaces (not tabs) for indentation.
- 2
Read the pretty-printed JSON that appears below the box as you type.
- 3
If a red error message shows instead, check your indentation and remove unsupported syntax.
- 4
Select and copy the JSON output to paste into your config, code, or API client.
什麼是 YAML 轉 JSON 工具?
YAML 和 JSON 都是資料交換格式,能夠表示相同的結構。YAML 對人來說更易讀(沒有大括號或引號),而 JSON 則更具普遍的可剖析性。當你需要將資料輸入到只接受 JSON 的工具中時,在兩者之間轉換是設定檔(GitHub Actions、Docker Compose)的常見需求。
常見使用場景
Quickly turning a small docker-compose.yml or GitHub Actions snippet into JSON to inspect its structure.
Converting a hand-written config block into JSON to paste into a tool or API that only accepts JSON.
Checking how YAML scalars like true, 123, or ~ get typed once they become JSON values.
Sanity-checking indentation in a YAML fragment by seeing whether the nesting comes out as you expect.
Generating seed JSON fixtures for tests from a more readable YAML draft.
Teaching or learning the mapping between YAML structures and their JSON equivalents.
常見問題
支援 YAML 的進階功能嗎?▼
相關工具
JWT 解碼器
即時解碼 JSON Web Token(JWT)。完全在你的瀏覽器中執行:權杖絕不會離開你的裝置,可安全用於正式環境的密鑰。
JSON格式化與驗證工具
線上格式化、驗證和壓縮JSON。完全在你的瀏覽器中執行:你的資料永遠不會離開你的裝置。
XML 格式化工具
格式化並美化 XML 文件。適用於 SOAP、網站地圖、RSS 訂閱源和設定檔。
Base64 編碼與解碼工具
將字串編碼為 Base64,或將 Base64 解碼為文字。尊重你的隱私:全部在你的瀏覽器中執行。
URL 編碼與解碼工具
將文字轉換為 URL 安全的編碼(百分號編碼),或進行反向轉換。適用於查詢字串、重新導向和 OAuth 流程。
HTML實體編碼與解碼工具
將特殊字元轉換為HTML實體(&、<等),或進行反向轉換。適用於將文字安全地嵌入HTML。