Back to Blog

What Is Unicode and Why Hindi Text Needs It

Bishal Khanal, founder and developer of HindiType
Written byBishal Khanal

Founder & Developer

22 min read
Share article:

You copy a Hindi line from an old file into a message, and it arrives as a string of strange symbols. Or you type a sentence on your own device, send it, and the other person sees empty boxes. Nothing is wrong with your eyes or your typing. Behind both problems sits one idea that most people never hear about: how a computer stores the letters of a language. The short answer to what is Unicode Hindi is that it is the shared way of storing Hindi letters, signs and digits, so that a modern device can show, search and copy them in the same way.

This guide explains Unicode Hindi in plain language. It covers what Unicode is, the difference between a character, a code point and a font, how Hindi was typed before Unicode, why old font text turns into symbols, what Unicode gives you, how letters, signs and the halant are stored, why the order of storing differs from the order of seeing, what an encoding is, how fonts fit in, how to tell old text from Unicode, how to convert and check it, and where it matters in daily life. The examples are written for this page. The technical facts are kept simple, and the times are suggestions and not typical figures.

IN SHORT: KEY TAKEAWAYS
Quick Overview
1

Unicode: a shared standard that gives every character its own number.

2

Three layers: the character, its number and the font that draws it are different things.

3

Old fonts: they stored English codes and only looked like Hindi in one special font.

4

Unicode text: it stores real Hindi letters, so it can be searched, copied and sorted.

5

Signs: each vowel sign and the halant is its own character, stored in the order of the sounds.

6

Encoding: the way numbers are written as bytes, and a wrong choice gives strange letters.

7

Convert with care: use the converter that matches the old font, and check the result.

What Unicode is, in plain words

A computer does not store letters. It stores numbers, together with a rule that says which number stands for which character. Long ago, different systems used different rules, so the same number could mean one letter in one place and another letter somewhere else. Text moved from one system to another often came out wrong.

Unicode is a shared standard that fixes this. It gives every character of every script its own unique number, called a code point. Hindi letters, vowel signs and digits have their own code points, in a block that is set aside for the Devanagari script. Because everyone agrees on the numbers, text that you type on one device can be read on another.

Unicode is not a program, and it is not a font. It is an agreement about numbers, kept up by an international group of people. When someone says that Hindi text is "in Unicode", they mean that the text stores the real Hindi characters according to this agreement.

Three layers: the character, the code point and the font

Most confusion about Hindi text comes from mixing three things that are separate. It helps to keep them apart.

THREE LAYERS

Who decides what

LayerWhat it isExample
The characterThe letter or sign as an ideaThe letter क
The code pointThe number that Unicode gives to itU+0915
The fontThe drawing that shows it on the screenThe shape that you see

Unicode decides the first two layers. The font decides the third. If you change the font, the shape of क changes a little, but the character and its number stay the same. This is why Unicode text looks like Hindi in any font that carries Devanagari, and why old text, which depended on one special font, did not.

Keep this picture in mind for the rest of the guide. When something looks wrong on the screen, ask which layer has the problem: the text, the way it was read, or the font.

How Hindi was typed before Unicode

Before Unicode became common, many people typed Hindi with special fonts. These fonts were clever, and they were also a trick. The text that you typed was not stored as Hindi letters. It was stored as ordinary English letters and symbols, and the font drew a Hindi shape on top of each one.

So a file that looked like Hindi was really a string of English characters. Open it with the right font, and the shapes appeared. Open it without the font, and you saw the English characters, which looked like nonsense. Different fonts used different codes, so text typed in one of them looked wrong in another.

This worked well enough inside one office or one print shop, where everyone had the same font. It failed as soon as text left that place. We call this kind of text legacy font text, or old font text, and it is the reason why Unicode matters so much for Hindi.

Why old font text turns into random symbols

Old font text breaks whenever it leaves the place where its font lives. The table lists the usual moments, and what happens at each.

What you doWhat happensWhy
Open the file on a device without the fontEnglish letters and symbols appearThe font that drew the Hindi shapes is missing
Copy the text into a message or a web pageSymbols appearThe font does not travel with the text
Search for a Hindi wordNothing is foundThe text holds English codes, not Hindi letters
Sort a listThe order looks wrongThe sorting follows the English codes
Ask a tool to read the text aloudThe speech is nonsenseThe tool reads the English codes
Mix text from two old fontsSome shapes are wrongEach font used different codes

None of this means that the text is lost. The original Hindi is still in there, hidden behind the codes. It means that the text needs to be converted into real Hindi characters before it can be shown, searched and shared in the usual ways.

What Unicode gives Hindi text

When Hindi is stored as Unicode, the text holds real Hindi characters. That changes what you can do with it.

You want toWith Unicode textKeep in mind
Show it on another deviceIt usually appears, if the device has a font that carries DevanagariA missing font can still show boxes
Search for a wordA search can find itThe word must be typed in the same way
Copy and pasteThe text moves between programsSome places remove or change characters
Sort a listA program can sort by the Hindi lettersThe order may follow the program's own rules
Listen to itA tool can read it aloudSpeech tools can mispronounce
Put it on a web pageThe page can show it in any font that you chooseCheck the page once on a small screen
Mix it with EnglishBoth live in the same textCheck the spacing

Notice the words "usually" and "can". Unicode removes the old trap, but it does not remove every problem. Fonts, programs and forms still differ, and a careful look at the final result is always worth a minute.

How Hindi letters, signs and the halant are stored

Every Hindi letter has a code point. So does every vowel sign, every dot mark, the halant and the nukta. The Devanagari block in Unicode runs from U+0900 to U+097F. Here are a few characters with their code points.

CODE POINTS

Some Hindi characters

CharacterCode pointPlain name
कU+0915A consonant
षU+0937A consonant
◌ाU+093EThe long a sign
ि◌U+093FThe short i sign
◌ेU+0947The e sign
◌ंU+0902The dot
◌ँU+0901The moon dot
◌ःU+0903The two dots
◌्U+094DThe halant
◌़U+093CThe nukta

The key idea is that a vowel sign is not part of a letter. It is a character of its own, stored after the consonant that it belongs to. The halant is also a character of its own. A syllable on the screen may be made of several stored characters, and a joined letter is made of a consonant, a halant and another consonant.

One shape, several stored characters

Because signs and the halant are separate characters, one shape on the screen can be more than one stored character. The table shows a few words and the order in which their characters are stored.

WordStored in this orderWhat to notice
किU+0915, U+093FTwo characters, one shape
क्षU+0915, U+094D, U+0937Three characters, one shape
कर्मU+0915, U+0930, U+094D, U+092EThe र is stored before the halant, and the hook is drawn above म
नमस्तेU+0928, U+092E, U+0938, U+094D, U+0924, U+0947Six characters, and fewer shapes on the screen

This explains something that surprises many people: a word count and a character count can disagree with what you see. A tool may count the stored characters, and another may count the shapes. Our Word & Character Counter shows a length, and you should read how it counts if the exact number matters to you.

Why the stored order differs from the order you see

Unicode stores Hindi in the order of the sounds, the same order in which you would say the syllable. The screen then decides how to draw it. This is why two things look backwards at first.

STORED OR DRAWN

Two cases to remember

  • The sign ि: it is drawn to the left of the consonant, but it is stored after it. To write कि, the consonant comes first, and the sign second.

  • The reph: the hook of a र at the start of a joined letter is drawn above the next letter, but the र is stored before the halant and the next consonant.

This is the reason why typing order is consonant first and sign after. Your fingers follow the stored order, and the font and the program draw the shape. Our guide on how to type vowel signs and the halant explains the typing habit, and our guide on how to type joined letters, or conjuncts, explains the shapes in depth.

When a word looks odd on the screen, trust the stored order and not the picture. Say the word aloud, and write its characters in the order of the sounds.

Encodings: how numbers become bytes

A code point is a number, and a file needs to write that number down in bytes. The rule for doing so is called an encoding. The most common encoding for the web is UTF-8. In UTF-8, a plain English letter takes one byte, and a Devanagari character usually takes three bytes.

You do not need to learn how the bytes work. You need to know one thing: a program must read a file with the same encoding that was used to write it. If it reads the bytes with the wrong rule, the Hindi characters turn into strange letters, often accented English letters or sequences of odd marks. People call this broken text. It is not damage to your file. It is a mismatch in reading.

What you seeLikely causeWhat to try
Accented English letters in place of HindiThe file is read with the wrong encodingOpen or import the file again, and choose UTF-8 if the program asks
Question marks in place of HindiCharacters were lost when the file was saved with an encoding that cannot hold themSave again from the original, and choose UTF-8
Empty boxesThe font has no shape for the characterChoose a font that carries Devanagari
Hindi looks fine in one program and strange in anotherThe programs read the file in different waysCheck the encoding option of the second program
Symbols that do not change when you change the fontThe text is old font textConvert it with the matching converter

These are general causes, and the names and places of options differ from program to program, so use the help of your own program.

Unicode is the text, the font is the look

Unicode decides what the text says. A font decides how it looks. Keeping this straight saves a lot of worry.

A font may not carry every Hindi character. If a program shows an empty box, the text is usually fine, and the font has no shape for that character. Choose another font, and the box becomes a letter. Fonts also draw joined letters in different ways. One may draw a joined letter as a compact single shape, and another may draw it as a letter with a smaller letter beside it. Both are the same text.

For text that you share, choose a font that draws Devanagari well, and look at the page once on the device where it matters. At a small size, signs above and below the line can look faint, so enlarge the text before you decide that a sign is missing. This guide names no fonts, because fonts differ between devices and change over time.

One shape, more than one way of storing

Sometimes the same shape can be stored in more than one way. A good example is a letter with a dot below, the nukta. A letter such as ड़ can be stored as one character, or as the plain letter ड followed by the nukta. On the screen, the two look the same.

SAME LOOK, DIFFERENT STORAGE

What it means

  • On the screen: you may not be able to tell the two apart.

  • In a search: a program may treat them as different, and miss a word that you can see.

  • In practice: many programs and keyboards use one method consistently, and some programs tidy the difference for you.

  • Your habit: if you work on a long document, keep to one way of typing such letters, and check your nukta words once at the end.

Do not worry about this in everyday use. It matters mostly when a search or a comparison behaves oddly. Our guide on Hindi alphabet explained describes the nukta letters, and our Spelling & Matra Checker can point out many small mark errors, although a checker can also be mistaken.

How to tell Unicode text from old font text

You can often tell by looking at how the text behaves. The table lists signs, and a short test follows.

What you seeWhat it probably meansWhat to do
The text stays Hindi when you change the fontIt is UnicodeYou can use it as it is
The text turns into English letters and symbols when you change the fontIt is old font textConvert it with the matching converter
The text looks like Hindi only in one special fontIt is old font textFind out which old font, and convert
A search finds a Hindi word in the textIt is probably UnicodeCheck a few words to be sure
Empty boxes appearIt is probably Unicode, and the font lacks shapesChoose another font
Part Hindi and part odd symbolsThe text mixes two kindsConvert the odd part in small pieces
A SHORT TEST

Two minutes

  1. Paste a short line into a plain text box.
  2. Change the font once, and watch the line.
  3. Try to select one word, and try a search for it.
  4. If the line keeps its Hindi form and the search works, it is very likely Unicode.

Converting old text to Unicode safely

A converter reads the old codes and writes real Hindi characters. It works by rules, so it can make mistakes. The steps below are a careful way to use one.

1

Keep a copy of the original file, and work on a copy.

2

Find out which old font the text uses. If you do not know, try a short sample in each converter, and read the result. Real, sensible Hindi means that the converter fits.

3

Use the converter that matches the font. Our Krutidev to Unicode tool, our Chanakya to Unicode converter and our DevLys to Unicode converter each work on text typed in their own old font. A converter for a different font gives wrong or unreadable text.

4

Convert a small section first, and read it before you convert the rest.

5

Compare the new text with the original, one paragraph at a time.

6

Paste the converted text into your document as plain text, so that the old font does not come back.

7

Choose a font that carries Devanagari for the whole text.

Sometimes a person asks you for a file in an old font. If that happens, ask them first, and explain that Unicode is the modern way. If they still need it, our Unicode to Krutidev tool can write Unicode text in the old method, and you should check what it gives you. Keep your Unicode copy as your main file.

Checking converted text

Conversion by rules is quick, but a few patterns need your eyes. Always compare the result with the original.

What to checkWhyWhat to do
The small ee signIn old text it sat before the letter, and in Unicode it is stored after itCheck every word with this sign
The rephOld fonts placed it differentlyCheck words that start with a hook
Joined lettersOld fonts drew them as single shapesCompare each one with the original
The sentence end markIt may change into another signFix it with our Hindi Punctuation Formatter
DigitsOld digits can look differentCheck every number twice
English wordsThey may be changed by mistakeRetype them after converting
Extra spaces and breaksCopying can add themRemove them by hand

After you check by eye, paste a paragraph into our Spelling & Matra Checker and read each suggestion with care. Keep the original file until the final copy has been checked.

Scans, photos and PDFs

Not every Hindi text is a typed file. A scan or a photo of a page holds a picture, and not characters. Our Image/PDF to Text tool can make a first draft of editable text from such a file, and the draft needs careful checking. The text that it gives you is Unicode, which you can edit and search.

A PDF is a different case. Some PDFs hold real text, and some hold only pictures. If you copy text from a PDF and see symbols, the PDF may have been made with an old font, and you can try a short sample in a matching converter. If you want to edit a PDF as a document, our Hindi PDF to Word tool can prepare a file for editing, and its layout and letters should be checked afterwards.

Do not paste passwords, identity numbers, bank details or other private information into any online tool, and read the Privacy Policy of any site where you are unsure.

Typing Unicode Hindi yourself

The simplest way to be safe is to type Unicode from the start. A Hindi keyboard on a modern device produces Unicode, whichever layout you choose. Our guide on setting up a Hindi keyboard on a computer gives general steps, and our guide on Inscript for beginners explains one fixed layout in plain language.

If you cannot change the settings of a computer, our Virtual Hindi Keyboard lets you click the letters, and our guide on using an on screen Hindi keyboard explains how to use it well. Text typed there is Unicode too. Our Hindi Voice Typing tool lets you speak and see your words appear, and you should read the result as a draft.

The typing rule is the same everywhere: consonant first, and then the sign. This is the order in which Unicode stores the characters, and it is why the habit works on every layout. Our guide on common Hindi typing mistakes lists the slips to watch for.

Where Unicode matters in daily life

Most of the time you will not think about Unicode. The table lists places where it quietly does its work, and what to remember.

PlaceWhy Unicode helpsA tip
MessagesText arrives as Hindi on most devicesRead the message once before you send it
Web pagesThe page can show Hindi in any font that it choosesLook at the page on a small screen
DocumentsYou can search and edit Hindi textChoose one font for the whole text
Lists and tablesA program can sort and filter Hindi wordsCheck the order, because rules differ
FormsSome fields may accept HindiSome fields accept only English letters, which is a rule of the form
PrintingThe text prints as drawn by the fontAsk the print shop which file type it needs

If a form or a program does not accept Hindi, it is usually a limit of that form, and not a fault in your text. Ask the people who run it which characters it accepts.

Common mistakes with Hindi text and Unicode

MistakeWhy it hurtsWhat to try
Treating old font text as ordinary HindiIt breaks when it leaves its fontConvert it before you share it
Using the wrong converterThe output is wrong or unreadableMatch the converter to the old font
Trusting a conversion without checkingSmall signs and joined letters may be wrongCompare with the original
Blaming the keyboard for a font problemThe text is fine, and the font lacks shapesTry another font
Pasting with the old formattingThe old font can come backPaste as plain text
Mixing two ways of typing the same letterA search may miss a wordKeep one method
Saving a file with the wrong encodingHindi turns into question marksSave again from the original with UTF-8
Deleting the original file too soonYou cannot compare or redoKeep the original until you are sure

Choose one row of the table each week and work on that single habit. Changing everything at once is the surest way to change nothing.

A week to make your Hindi text Unicode

If you have old files, a short plan keeps the job calm. The times are suggestions, and you can change them to suit your work.

DayFocusSuggested time
Day 1List your old files, and keep a copy of each15 minutes
Day 2Find out which old font each file uses, with short samples15 minutes
Day 3Convert one small file with the matching converter15 minutes
Day 4Check the result against the original, line by line20 minutes
Day 5Fix signs, joined letters and the sentence end mark15 minutes
Day 6Rest, or convert one more short fileOptional
Day 7Save the final text, and test it on another device15 minutes
CONVERSION LOG

A template that you can copy

FileOld font methodProblem I metWhat worked
Example file 1 (example only)A typed practice sheetJoined letters looked wrongI compared line by line, and fixed three words
Example file 2 (example only)A short noticeThe sentence end mark was a different signI used the punctuation tool, and read the line again
Your file 1(empty)(empty)(empty)
Your file 2(empty)(empty)(empty)

The first two rows are examples made up for this page. They show how to fill the log, and they are not typical results. If you plan to type new text as well, our guide on a simple weekly practice plan shows how to build a routine.

Realistic expectations

No page can promise that every conversion will be perfect, or that every device will show your text in the same way. It depends on the old font, the converter, the program that you open the file in and the fonts that your device carries. Some files convert cleanly, and some need patient checking, and both are normal.

Even with Unicode, small surprises remain. A font may lack a shape, a form may refuse Hindi, and a program may read a file in its own way. These are limits of places and of fonts, and not of the text. A calm look at what each layer is doing, the text, the reading or the font, usually points to the fix.

If a file matters for an important purpose, convert it with care, check it against the original, and ask another person to read it. Our guide on how to improve your Hindi typing speed step by step is useful if you plan to type new text in the future.

Frequently asked questions

8 common queries answered
Answer: It is the shared way of storing Hindi letters, signs and digits as real characters, each with its own number. Text stored this way can be shown, searched and copied on most modern devices.
Answer: Unicode decides what the text is, and a font decides how it looks. You can change the font, and the text stays the same.
Answer: Old font text was stored as English letters and symbols, and a special font drew the Hindi shapes. Without that font, you see the English characters. Converting it to Unicode shows the real letters.
Answer: Paste a short line into a plain text box and change the font. If it stays Hindi and a search can find a word, it is very likely Unicode. If it turns into symbols, it is old font text.
Answer: Keep a copy of the file, find which old font it uses, convert a small piece with the matching converter, and compare the result with the original. A converter for a different font gives wrong text.
Answer: A vowel sign, the halant and the nukta are characters of their own. A joined letter, for example, is stored as a consonant, a halant and another consonant, and the font draws them as one shape.
Answer: The text is usually fine, and the font has no shape for those characters. Choose a font that carries Devanagari, or try another program.
Answer: Do not paste passwords, identity numbers, bank details or other private information into any online tool, and read the Privacy Policy of a site if you are unsure.

Conclusion

Unicode is a simple idea with a large effect. Every character gets one number, the text is stored as real characters, and the font only decides how it looks. With the answer to what is Unicode Hindi in mind, the old puzzles make sense: why old font text turns into symbols, why a sign is stored after its letter, and why boxes appear when a font has no shape.

Start small. Look at your own files today, and use the short test to see which ones are Unicode. Convert one small old file with the matching converter, and check it against the original. Type new text in Unicode from now on, with a layout that you can keep, and paste as plain text. Our guide on how to improve your Hindi typing speed step by step is a good companion to this one.

Be patient with yourself, because Hindi text has many layers, and everyone learns them at their own pace. If something in this guide is unclear, or you find a mistake in it, please write to me through the Contact page, and I will correct it.

More from the blog

View all articles →