Skip to content

Web8 min read

Preeti to Unicode: Convert Old Nepali Text the Right Way

Why Preeti text shows as English letters, how to convert Preeti to Unicode for Word, Google Docs and the web, and how to type Nepali in English letters.

To convert Preeti to Unicode, copy the Preeti text from your Word file, paste it into a converter that maps each Preeti key to its Nepali letter and moves the short i sign and the reph into the right order, then paste the Unicode result back and set a Unicode Nepali font. My free Preeti to Unicode converter does this as you type, works in both directions and never uploads your text.

If you have ever opened an old office letter and seen g]kfn ;/sf/ instead of नेपाल सरकार, this guide explains why it happens, how to fix a whole document, and what a converter actually has to do to get Nepali right.

Key takeaways

  • Preeti text is English characters dressed up by a font. Without the font, the disguise falls off.
  • Unicode stores real Nepali letters, so it works on every phone, browser and app.
  • Converting is more than a character swap: ि and the reph (र्) must be moved, and some letters are built from two keys.
  • Convert Word files by copying the Preeti text through a converter and back, then switching to a Unicode font.
  • English words typed in Preeti will also be converted, so handle them separately.
  • Keep a Unicode copy of anything you will publish online. Google can index it, Preeti it cannot read properly.

Preeti and Unicode in plain words

Before Unicode was common, Nepali computer users typed with fonts like Preeti, Kantipur and PCS Nepali. These fonts take an ordinary English keyboard character and draw a Nepali glyph in its place. When you press g with Preeti selected, the computer stores the letter g, and the font draws न.

That works on one computer with the font installed. It breaks as soon as the text moves:

  • A phone or another computer without Preeti shows the English letters.
  • Google Docs, Gmail, Facebook and most websites ignore your font choice.
  • Search engines index g]kfn, not नेपाल, so nobody finds the page.
  • Copy and paste carries the English letters, not the Nepali.

Unicode solves this by giving every Nepali letter its own code. नेपाल is stored as the characters न, े, प, ा, ल, and any Unicode font can draw them. Devanagari has its own block in the Unicode standard, and every modern operating system ships with a font for it.

How to convert a Preeti Word document

  1. Open the document in Word and select the Preeti text. Ctrl+A selects everything.
  2. Copy it.
  3. Open the converter and paste into the left box. The Unicode result appears on the right as you paste.
  4. Click Copy result.
  5. Back in Word, paste over the selected text.
  6. With the text still selected, change the font to a Unicode Nepali font: Kalimati, Mangal, Noto Sans Devanagari or Mukta all work.

If the document mixes Nepali and English, do it paragraph by paragraph and skip the English parts. For plain text files, the converter can open a .txt file directly and download the result as UTF-8 text.

What a converter has to get right

A converter that only maps each key to its letter turns lxdfn into िहमाल instead of हिमाल. That is the first lesson: Preeti stores text in the order it is drawn, Unicode stores it in the order it is read.

The short i sign

In Devanagari the short i sign ि is drawn to the left of its consonant, so Preeti users type it first: l then x for हि. Unicode stores the consonant first and the sign after it. The converter has to move ि past the whole consonant cluster, not just one letter. In राष्ट्रिय, typed /fli6«o, the sign has to jump over ष्ट्र.

The reph

The reph is the small hook of र् that sits on top of the next syllable, as in गर्ने. It is drawn last, so Preeti users type { after the syllable: ug{] or ug]{. In Unicode, र् comes before the consonant it sits on. The converter has to move it back over the consonant and any vowel signs typed after it.

Two-key letters

Some letters do not have their own key. फ is k plus m, झ is e plus m, and ऊ is p plus m. Sometimes a vowel sign is typed between the two keys, as in e]mNg' for झेल्नु, so the converter has to look back past the sign to find the base. Full letters like ण and क्ष are built from a half form plus f.

Here is the core of the reordering step from my converter, after every key has been mapped to its Unicode character:

JavaScript
const CONS = '[\\u0915-\\u0939\\u0958-\\u095F]\\u093C?';
const CLUSTER = `(?:${CONS}\\u094D\\u200D?)*${CONS}(?:\\u094D\\u0930)?`;
const SIGNS = '[\\u093E-\\u094C\\u0901\\u0902\\u0903]';

// ि typed before a cluster moves after it: "ि ह" becomes "हि"
text = text.replace(new RegExp(`\\u093F(${CLUSTER})`, 'g'), '$1ि');
// the reph placeholder moves before the syllable it was typed after
text = text.replace(new RegExp(`(${CLUSTER}${SIGNS}*)${REPH}`, 'g'), 'र्$1');

The reverse direction, Unicode to Preeti, does the opposite: it moves ि in front of its cluster and the reph to the end of its syllable, then picks the right key for every letter, including half forms like S for क्.

How I tested the converter

Converters fail on the hard words, so that is where I test. The automated tests check more than thirty tricky Preeti strings, including हिमाल, राष्ट्रिय, गर्ने typed both ways, कार्य, प्रतिक्रिया, क्षेत्र, ज्ञान, आफ्नो, जाऊँ, झेल्नु, पर्‍यो, हेर्थ्यो and the Devanagari digits. Then they convert a corpus of more than a hundred common Nepali words to Preeti and back, and every word has to come back exactly the same. The examples table on the tool page is generated by the same code when the site builds, so what you see there is what the tool does.

Typing Nepali without a Nepali keyboard

Most people who end up with Preeti text were never taught a Nepali keyboard layout. If you only need to write a few lines, there is an easier way: type the words in English letters and let the tool write the Nepali. Choose Roman → नेपाली in the converter and type mero naam. The right box shows मेरो नाम as you type, in Unicode, ready to copy anywhere.

The rules are short and predictable:

  • Consonants next to each other join automatically: namaste gives नमस्ते and garnu gives गर्नु.
  • Double a vowel for the long sound: aa is ा, ii or ee is ी, uu or oo is ू. So nepaal gives नेपाल.
  • Capitals give the retroflex letters: T Th D Dh N Sh are ट ठ ड ढ ण ष, so kaaThamaaDau* gives काठमाडौँ.
  • M is ं, * is ँ, ~ is a visible halant, a full stop becomes ।, and digits become Nepali digits.
  • Anything inside {curly braces} stays in English, for names like {Google}.

A capitalised word such as Mero or Nepal is read as an ordinary word, so sentence case from a phone keyboard does not break anything. The full cheat sheet is on the tool page.

Converting Unicode back to Preeti

Sometimes you need to go the other way: an office template, a printing press or an old design file still uses Preeti. Switch the converter to Unicode → Preeti, paste your Unicode Nepali, and copy the result. It will look like random English characters on the page, which is correct. Paste it into a document where the font is set to Preeti and it will display as Nepali.

Common problems and fixes

  • Boxes or blank squares after converting. The font you chose does not support Devanagari. Switch to Kalimati, Mangal or Noto Sans Devanagari.
  • English words became Nepali letters. They were typed in Preeti too. Retype them after converting.
  • Text was already Unicode. If the input contains Nepali letters, the converter tells you and suggests the other direction.
  • Letters slightly off in a few words. Some documents were typed with a different legacy font, such as Kantipur or PCS Nepali, which use different keys. Check which font the original used.
  • Numbers came out as Nepali digits. In Preeti the shifted number keys are Nepali digits. If you need English digits, retype them.

Why Unicode matters for Nepali on the web

I build websites, so this is the part I care about most. A Nepali page written in Preeti is invisible to search engines in any useful way, unreadable for screen readers, and broken on most phones. The same text in Unicode can be found by people searching in Nepali, read aloud, translated and copied into any app. If you publish notices, results or news in Nepali, publishing in Unicode is the single easiest thing you can do to reach more people.

The converter runs entirely in your browser, so it is safe for official letters and private documents. If you work with documents a lot, my PDF tools merge and split PDFs without uploading them, and the photo resizer prepares photos for Lok Sewa and other forms.

FAQ

Why does my Nepali text look like g]kfn?

Because it was typed in the Preeti font, which draws Nepali letters on top of English keyboard characters. On a device without Preeti, or in an app that ignores the font, you see the underlying English characters. Converting the text to Unicode fixes it everywhere.

How do I convert a Preeti Word document to Unicode?

Select the Preeti text in Word, copy it, paste it into a Preeti to Unicode converter, copy the result and paste it back. Then set the text to a Unicode Nepali font such as Kalimati, Mangal or Noto Sans Devanagari.

Is Unicode better than Preeti?

For anything digital, yes. Unicode text shows correctly without special fonts, works on phones and the web, can be searched and indexed by Google, and is readable by screen readers. Preeti only makes sense for old templates that require it.

Can I convert Unicode back to Preeti?

Yes. Use the Unicode to Preeti direction, then paste the result into a document set in the Preeti font. Some offices and print shops still ask for Preeti files.

Why do some letters come out in the wrong order after conversion?

Preeti stores the short i sign (ि) before its letter and the reph (र्) after its syllable, because that is how they are drawn. A converter that maps characters one by one leaves them in the wrong place. A good converter moves them into Unicode order.

What happens to English words in a Preeti document?

If the English words were typed in the Preeti font, they convert into Nepali letters, because Preeti uses the same keys. Convert only the Nepali parts, or retype the English words after converting.

Wrapping up

Preeti text is English characters in disguise, which is why it breaks the moment it leaves the computer it was typed on. Converting it to Unicode means mapping every key and then putting ि and the reph back in reading order. Paste your text into the free Preeti to Unicode converter, copy the result, set a Unicode font, and your Nepali will display correctly everywhere.

  • #nepali
  • #unicode
  • #preeti
  • #fonts
  • #javascript
  • #tools

Web7 min read

Merge, Split and Compress PDFs Without Uploading

How to merge, split, compress, rotate and convert PDFs for free without uploading them, why it matters for private documents, and how browser-only tools work.

Read article

Web8 min read

PWA Offline Support: Build an Installable Web App

Build a PWA with offline support: web app manifest, service worker caching strategies, a custom install prompt and the iOS caveats that still catch people out.

Read article