The FHIR specification defines multiple serialization formats for FHIR resources which include (but are not limited to) XML and JSON. These formats can be used for different purposes but all of them are supposed to be interchangeable (round-trippable) and be able to represent the same content.
Conversion between these formats is a common task in FHIR development. It is also common to have to convert between the formats when exploring FHIR resources, depending on which format is more convenient for the task at hand.
I've created this simple FHIR Converter tool to allow you to easily and quickly convert instances of FHIR resources from XML to JSON and back. The tool uses the FHIR.js library (fhir on npm, not to be confused with fhir.js) to perform the conversion on the client.