Convert X-SAMPA to IPA
X-SAMPA is a clever workaround for a real problem: the International Phonetic Alphabet (IPA) uses hundreds of special Unicode characters that are awkward to type. X-SAMPA re-encodes every one of those symbols as plain ASCII so linguists can transcribe speech on an ordinary keyboard. This tool reverses that encoding, turning an X-SAMPA string back into the proper Unicode IPA symbols.
How it works
The converter scans your input left to right and, at each position, tries to match the longest X-SAMPA token in its lookup table before falling back to shorter ones. This greedy, longest-first matching is essential because many codes share a prefix:
r\` → ɻ (retroflex approximant)
r\ → ɹ (alveolar approximant)
r` → ɽ (retroflex flap)
r → r (alveolar trill, unchanged)
If no multi-character token matches at the current position, the single
character is checked; if it still isn’t in the table it is passed through
unchanged, because ASCII letters like p, t, s and the vowels a e i o u
already mean the same thing in both systems. Stress marks (" → ˈ, % → ˌ) and
length marks (: → ː, :\ → ˑ) are mapped the same way.
Example and notes
The X-SAMPA string h@"loU wr3ldconverts tohəˈloʊ wrɝld, recognising @as schwa,”as primary stress,oUas the diphthong, and3“ as the rhotic
vowel. Because the table covers clicks (O\ → ʘ, |\ → ǀ) and implosives
(b_< → ɓ, g_< → ɠ) as well, it handles transcriptions from a wide range of
languages, not just English. For the reverse direction, use the companion
IPA-to-X-SAMPA converter.
Who uses X-SAMPA and why it matters
X-SAMPA was standardised by ETSI (European Telecommunications Standards Institute) specifically for speech synthesis and speech recognition systems that must remain plain-text at every stage. It appears in:
- TTS/ASR lexicons — pronunciation dictionaries for text-to-speech engines often store entries in X-SAMPA so the files remain ASCII and version-control friendly.
- Corpus linguistics — older corpora, especially those from the 1990s and 2000s, encoded phonemic transcriptions in X-SAMPA before Unicode became universal.
- Conlang and phonology note-taking — working phonologists sometimes draft transcriptions in X-SAMPA in a plain text editor and convert to proper IPA only at publication time.
Common symbols quick-reference
| X-SAMPA | IPA | Sound (example) |
|---|---|---|
@ | ə | schwa (“about”) |
E | ɛ | open-mid front vowel (“bed”) |
O | ɔ | open-mid back vowel (“thought”) |
S | ʃ | voiceless postalveolar (“ship”) |
Z | ʒ | voiced postalveolar (“measure”) |
N | ŋ | velar nasal (“sing”) |
tS | tʃ | affricate (“church”) |
dZ | dʒ | affricate (“judge”) |
" | ˈ | primary stress |
: | ː | length mark |
Plain ASCII letters that are identical in both systems (p, b, t, d, k, g, m, n, f, v, s, z, l, w, j, r, and the basic vowels a, e, i, o, u, y) pass through the converter unchanged.
Practical tips
- Always paste the full X-SAMPA string including stress and boundary markers — omitting the primary-stress diacritic
"produces correct IPA letters but drops the ˈ, which matters for TTS. - If a character comes through unchanged and you expected a conversion, check whether the source uses a non-standard variant. Some tools output SAMPA (without the “X” extension) which differs slightly from X-SAMPA for a handful of symbols.
- The converter outputs Unicode codepoints; paste the result into a document that uses a phonetic-capable font (SIL Doulos IPA, Charis SIL, or similar) to ensure all glyphs render correctly.