JSON to strings.xml Converter
Convert JSON objects into Android strings.xml and string-array resources.
Paste a JSON object to convert it into Android resources.
About This Tool
The JSON to strings.xml Converter turns a JSON object into Android string resources. Nested objects become flattened snake_case names, primitive values become <string> elements, and primitive arrays become <string-array> elements.
Benefits and Use Cases
- Convert API or configuration JSON into Android resources
- Flatten nested JSON keys into safe resource names
- Convert lists into Android string arrays
- Escape XML characters automatically
- Copy generated resources into an Android project
How to Use
- Paste a JSON object.
- Choose a resource name prefix.
- Click
Generate XML. - Review and copy the generated
strings.xmloutput.
Android Example
Input:
{
"app": { "title": "Compose Tools" },
"menu": ["Home", "Settings"]
}Output includes:
<string name="json_app_title">Compose Tools</string>
<string-array name="json_menu">
<item>Home</item>
<item>Settings</item>
</string-array>Frequently Asked Questions
What JSON root format is supported?
The root must be a JSON object. Nested objects, primitive values, and primitive arrays are supported.
How are arrays converted?
Arrays containing strings, numbers, or booleans become <string-array> resources. Nested arrays and objects are flattened into individual resources.
Does the tool preserve JSON nesting?
It flattens nested keys into one Android resource name using snake_case.
Is my JSON uploaded?
No. Parsing and conversion run locally in your browser.