How to use
- Enter the array name used in R.array.
- Paste your list, one item per line.
- Copy the XML or download it as arrays.xml.
- Put it under res/values/ in your Android project.
When an Android app needs a fixed list — countries, categories, spinner options — the usual place is a <string-array> in res/values. Typing <item> tags by hand for dozens of entries is tedious, and one stray apostrophe can break the build. This converter turns a plain text list, one entry per line, into a complete <resources> block you can paste into strings.xml or save as arrays.xml.
Each line is trimmed, empty lines are dropped, and lines starting with "[source" are skipped. For string-array and array, the characters & < > are written as XML entities, backslash, apostrophe and double quote get a backslash, and an item that starts with @ or ? is escaped so it is not read as a resource reference. The array name keeps only letters, digits and underscores, and a leading digit gets an underscore in front. In code you read it with getResources().getStringArray(R.array.name), or getIntArray for an integer-array.
Limits: integer-array items are copied as typed and not checked, so make sure each line is a whole number. Format placeholders such as %s or %d are left unchanged. The text you paste is processed only in this browser and is never sent or saved.