This template converts X-SAMPA to IPA using Lua. It provides a way to more easily type in the International Phonetic Alphabet. It is meant to always be substituted.

The following is a possible narrow transcription of the word example in two English dialects, followed by other random things.

{{subst:x2i|[@g"z{mp7]}} [əɡˈzæmpɤ]
{{subst:x2i|1=[@\g"zA:mp5=]}} [ɘɡˈzɑːmpɫ̩]
{{subst:x2i|/ai_^.pi"e/}} /ai̯.piˈe/
{{subst:x2i|/pu_L.tU_HN.xu_^a_F/}} /pù.tʊ́ŋ.xu̯â/
{{subst:x2i|/es.pa"Jol/}} /es.paˈɲol/
{{subst:x2i|/h\In.d_dUs"t_da:n.i:/}} /ɦɪn.d̪ʊsˈt̪aːn.iː/
{{subst:x2i|/"dOY_^tS/}} /ˈdɔʏ̯tʃ/
{{subst:x2i|/"?\arabi:/}} /ˈʕarabiː/
{{subst:x2i|[fXa~.se]}} [fχã.se]
{{subst:x2i|/poxtu"gejS/}} /poxtuˈɡejʃ/