XML → JSON

XML 文書を JSON に

XML入力

Loading editor...

JSON出力

Loading editor...

Turn XML responses into modern JSON objects

When you have to integrate with a SOAP service, RSS feed, or legacy XML API, you don't want XML living in your codebase. Converting XML to JSON gives you a familiar object shape — attributes prefixed with @, elements as keys, and text content as values — that fits cleanly into JavaScript, TypeScript, Python, or any modern stack.

Use the converter when you need to

Process a SOAP response in modern code

Convert the XML envelope to JSON and work with attributes and elements as plain object properties.

Parse RSS, Atom, or sitemap feeds

Aggregators and crawlers often need feed data as JSON for downstream processing — convert once and pipe forward.

Inspect XML structure quickly

Converting to JSON makes it easy to drop the document into a JSON viewer or query with JSONPath.

How to convert XML to JSON quickly

  1. 1

    Paste the XML document into the editor.

  2. 2

    Click Convert to produce JSON where attributes use the @ prefix and elements become keys.

  3. 3

    Copy the JSON output or download it for use in your code.

Common XML-to-JSON workflows

Modernize a legacy integration

Wrap an XML API in a JSON adapter and gradually replace the legacy code without breaking consumers.

Aggregate RSS feeds for a dashboard

Convert each feed to JSON and merge them into a single uniform array.

Audit an XML response

Convert the document to JSON and walk it in a viewer instead of trying to read raw XML.

関連ツール

よくある質問

XMLドキュメントを貼り付けて「Convert」をクリックします。要素、属性、テキスト内容を解析し、構造化されたJSONオブジェクトに変換します。属性は子要素と区別するため、@ をプレフィックスとして付けます。

属性は @ プレフィックス付きのプロパティになります。例:<book id="1"> は {"book":{"@id":"1"}} のように変換されます。このルールにより、属性と子要素を明確に区別できます。

ブラウザ内で動作するため、数MB程度までなら快適に扱えます。非常に大きいXML(100MB+)の場合は、サーバーサイドのツールやストリーミングパーサーの利用を検討してください。

はい。CDATAの内容はJSON出力ではプレーンテキストとして取り出され、CDATAのラッパー構文なしで元の内容が保持されます。