Pahawh Converter (v2)

Convert Hmong RPA to Pahawh Hmong. For full demo, visit the Pahawh Converter at Pahawh Hmong Platform.

On this page:

  1. Getting started
  2. Static conversion
  3. Toggle
  4. Dynamic content
  5. JavaScript API

About Pahawh Hmong

Pahawh Hmong (𖬖𖬲𖬝𖬵 𖬄𖬲𖬟 𖬌𖬣𖬵) is an indigenous writing system created by Shong Lue Yang in the 1950s for the Hmong language. It is encoded in Unicode at code points U+16B00–U+16B8F. The script reads left to right and encodes syllables differently from the Latin-based RPA — vowels are written before consonants in Pahawh, which is the reverse of RPA.

Learn more:
Mother of Writing: The Origin and Development of a Hmong Messianic Scriptarrow_outward
by Chia Koua Vang, Gnia Yee Yang & William A. Smalleyarrow_outward (co-founder of the Hmong RPA writing system)


Getting started

Dependency

The library applies 'Noto Sans Pahawh Hmongarrow_outward', sans-serif to converted elements. For best rendering load the font in your <head> before the library:

HTML
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Pahawh+Hmong&display=swap" rel="stylesheet">
                                

Pahawh Stage Support

Pahawh Converter 2.0 supports both the Second Stage Reduced Version and the Third Stage Refined Version. The default conversion uses the Third Stage Refined Version.

Refer to the JavaScript API on how to use 2nd Stage Reduced Version.

1. Static conversion .to-pahawh

One-way. RPA text is converted to Pahawh on page load. No button, no toggle. Use this for headings, labels, nav items — any static UI text.

*Any word not recgonized as Hmong will be ignore (with exceptions).

Nyob zoov saw dawg

Ua tsaug ntau heev rau koj

Nyob Zoo everyone, koj nyob li cas?

arrow_forward

Nyob zoov saw dawg

Ua tsaug ntau heev rau koj

Nyob Zoo everyone, koj nyob li cas?

HTML
<p class="to-pahawh">Nyob Zoo sawv daws</p>
<p class="to-pahawh">Ua tsaug ntau heev rau koj</p>

<!-- English words pass through silently -->
<p class="to-pahawh">Nyob Zoo everyone, koj nyob li cas?</p>

2. Toggle

Starts as RPA .toggle-pahawh .rpa

RPA is converted to Pahawh on load. The swap button lets readers toggle back.

Kuv hlub hmoob.

Koj puas paub hais lus hmoob?

HTML
<p class="toggle-pahawh rpa">kuv hlub hmoob.</p>
<p class="toggle-pahawh rpa">Koj puas paub hais lus hmoob?</p>

Starts as Pahawh.toggle-pahawh .pahawh

Text is already authored in Pahawh unicode. The swap button converts to RPA on demand.

𖬇 𖬆𖬥 𖬌𖬣𖬵.

𖬒𖬲 𖬑𖬲𖬪𖬵 𖬄𖬪𖬵 𖬋𖬲𖬟 𖬇𖬲𖬞 𖬌𖬣𖬵?

HTML
<p class="toggle-pahawh pahawh">𖬇 𖬆𖬥 𖬌𖬣𖬵.</p>
<p class="toggle-pahawh pahawh">𖬒𖬲 𖬑𖬲𖬪𖬵 𖬄𖬪𖬵 𖬋𖬲𖬟 𖬇𖬲𖬞 𖬌𖬣𖬵?</p>

3. Dynamic content

Content added after page load. Use PahawhConverter.convert(el) manually, or pass { observe: true } to init() to watch automatically.

Click the button to inject dynamic content…

JavaScript
// Option A — manual convert after injecting
const el = document.createElement('p');
el.className = 'to-pahawh';
el.textContent = 'Nyob Zoo';
container.appendChild(el);
PahawhConverter.convert(el);

// Option B — observe mode (set once at init)
PahawhConverter.init({ observe: true });

4. JavaScript API


PahawhConverter.toPahawh(text, mode?, version?, options?)
Convert RPA → Pahawh. version: 2 or 3. options: { pahawhPunctuation, pahawhNumerals, pahawhRedup }

PahawhConverter.toRPA(text, version?)
Convert Pahawh unicode string → RPA string. version: 2 or 3 (default 3)

PahawhConverter.toggle(el)
Flip a .toggle-pahawh element between Pahawh and RPA

PahawhConverter.convert(el)
Manually process a single .to-pahawh or .toggle-pahawh element

PahawhConverter.init({ observe, root })
Re-scan for elements. observe:true enables MutationObserver.

PahawhConverter.version
Returns version (e.g. 2.0.0)
JavaScript
// Basic programmatic use (Uses Pahawh Stage 3 as default)
const pahawh = PahawhConverter.toPahawh('Nyob Zoo sawv daws');
const rpa    = PahawhConverter.toRPA('𖬒𖬮𖬵 𖬍𖬰𖬥𖬰 𖬏𖬤𖬵 𖬏𖬲𖬞𖬰');

// For using Second Stage Reduced
const pahawhV2 = PahawhConverter.toPahawh('Nyob Zoo sawv daws', 'plain', 2);
const rpaV2    = PahawhConverter.toRPA(pahawhV2, 2);

// Define optional conversion settings (opt-in)
const result = PahawhConverter.toPahawh('zoo zoo!', 'plain', 3, {
  pahawhPunctuation: true,   // !,? → 𖬸𖬹𖬷
  pahawhNumerals: true,      // 123 → 𖭑𖭒𖭓
  pahawhRedup: true          // zoo zoo → 𖬍𖬰𖬥𖬰 𖭂
});

// Enable dynamic content observation
PahawhConverter.init({ observe: true });

// Scope to a subtree or within a container
PahawhConverter.init({ root: document.getElementById('blog-content') });
Original Pahawh Converter by Vao Her © 2017. Library design, Pahawh Unicode mapping, optimization, and open-source release by Pahawh Platform © 2026. MIT License — Copyright © 2017-2026 Vao Her & Pahawh Platform. See LICENSE for the full text.