Sanskrit Typing Online — Type Sanskrit Shlokas in Devanagari
A practical guide to typing Sanskrit in Devanagari script online — covering IAST, ITRANS, shlokas, mantras, academic papers, and Vedic accents using phonetic transliteration.
Typing Sanskrit is a specific kind of frustration. You know the shloka, you can hear it in your head, you've recited it a hundred times — but the moment you try to type it on a keyboard, you're staring at a character map wondering how to get ṭ or ṣ or the anusvara right.
The good news: phonetic transliteration tools have made this genuinely manageable, even if you've never installed a special keyboard layout in your life.
Why Typing Sanskrit Is Different
Sanskrit uses the Devanagari script, which is the same script as Hindi — but that's where the similarity ends for typing purposes. Sanskrit has:
- Longer vowel distinctions that Hindi typing tools often flatten (ā vs a, ī vs i, ū vs u)
- Retroflex consonants (ṭ, ḍ, ṇ, ṣ) that sit in a different part of the mouth than their dental counterparts
- Aspirated pairs (kh, gh, ch, jh, ṭh, ḍh, th, dh, ph, bh)
- Vedic accent marks (udātta, anudātta, svarita) that almost no tool supports well
- The visarga (ḥ) and anusvara (ṃ or ṁ) that appear constantly in Sanskrit texts
Two Systems: IAST vs ITRANS
Before you start typing, you need to understand the two main romanization schemes used for Sanskrit.
IAST (International Alphabet of Sanskrit Transliteration) is the academic standard. It uses diacritic marks:| Sound | IAST | Example word |
|---|---|---|
| Long a | ā | ātman |
| Long i | ī | īśvara |
| Long u | ū | pūjā |
| Retroflex t | ṭ | paṭala |
| Retroflex d | ḍ | ḍamaru |
| Retroflex n | ṇ | gaṇeśa |
| Retroflex s | ṣ | viṣṇu |
| Palatal s | ś | śiva |
| Visarga | ḥ | duḥkha |
| Anusvara | ṃ | saṃskṛta |
| Sound | ITRANS | IAST equivalent |
|---|---|---|
| Long a | aa | ā |
| Long i | ii | ī |
| Retroflex t | T | ṭ |
| Retroflex s | Sh | ṣ |
| Palatal s | sh | ś |
| Visarga | H | ḥ |
| Anusvara | M | ṃ |
Using TranslitHub to Type Sanskrit
TranslitHub handles Sanskrit phonetic input well — you type in English (using a natural phonetic mapping), and it produces Devanagari output. The approach is straightforward: type how the word sounds, and the tool maps it to the correct Devanagari characters.Here's how a few common Sanskrit words transliterate:
| Type this | Gets you | Meaning |
|---|---|---|
| namaste | नमस्ते | I bow to you |
| dharma | धर्म | duty, righteousness |
| karma | कर्म | action |
| yoga | योग | union |
| shanti | शान्ति | peace |
| brahman | ब्रह्मन् | ultimate reality |
| atman | आत्मन् | self, soul |
| pranam | प्रणाम | respectful greeting |
| mantra | मन्त्र | sacred sound/text |
| shloka | श्लोक | verse |
Typing Full Shlokas
Let's walk through typing the Gayatri Mantra — arguably the most recited Sanskrit mantra — using phonetic input.
The mantra:
ॐ भूर्भुवः स्वः
तत्सवितुर्वरेण्यं
भर्गो देवस्य धीमहि
धियो यो नः प्रचोदयात्
Phonetic input sequence:
om bhurbhuvah svah
tatsaviturvare nyam
bhargo devasya dhimahi
dhiyo yo nah prachodayat
You won't get it perfect on the first try — the halant (virama) that marks consonant clusters needs attention. But most phonetic tools handle conjunct consonants automatically. "kshe" should produce क्षे, "tra" should produce त्र, "sva" should produce स्व.
The Mahamrityunjaya Mantra:
ॐ त्र्यम्बकं यजामहे
सुगन्धिं पुष्टिवर्धनम्
उर्वारुकमिव बन्धनान्
मृत्योर्मुक्षीय मामृतात्
Phonetic:
om tryambakam yajamahe
sugandhim pushtivardhnam
urvarukamiva bandhanat
mrtyormukshiya mamritat
Note: "mrityu" (मृत्यु) is the tricky one — the ṛ vowel (ऋ) needs special handling. In most phonetic tools, type "ri" or "Ri" for the vowel ṛ. So "mrityu" → "mRityu" in ITRANS, or you can experiment with what your tool accepts.
Academic Use: Sanskrit in Research Papers
If you're writing a Sanskrit thesis, dissertation, or journal article, you have two main requirements:
- Correct IAST transliteration in the Latin script for phonological discussion
- Correct Devanagari for quotations and primary source material
For Devanagari quotations, phonetic input tools are genuinely useful. Type the shloka in phonetic form, copy the Devanagari output, paste it into your document. Change the font to Noto Sans Devanagari or Sanskrit 2003 (a free academic font with Vedic accent support).
One thing to watch: word processors auto-correct Sanskrit. Disable autocorrect entirely when working with Sanskrit text, or it will mangle your conjunct consonants and matras.
For longer Sanskrit texts, many scholars use GRETIL (Göttingen Register of Electronic Texts in Indian Languages), which has pre-digitized versions of major texts in Devanagari and IAST. Useful for checking your transcription.
Vedic Accents — The Difficult Part
Classical Sanskrit (post-Pāṇini) doesn't mark pitch accents in writing. Vedic Sanskrit does, and this is where most typing tools fail completely.
The three Vedic accents:
- Udātta (high pitch) — marked with a vertical stroke above: à in some conventions, just bold in others
- Anudātta (low pitch) — marked with a horizontal stroke below
- Svarita (falling pitch) — combination mark
If you need Vedic accents for a chanting text or Vedic recitation manuscript, you'll need specialized software. The SanskritWriter tool and the Itranslator software (free, Windows) handle Vedic accents through special codes. For web use, you're mostly out of luck with standard phonetic tools — it's an area where the tools haven't caught up to the academic need.
For most users — typing mantras, shlokas, devotional texts, Sanskrit social media posts — you won't need Vedic accents. Classical Sanskrit texts (Gita, Ramayana, Upanishads) are written without accent marks.
Common Sanskrit Phrases Worth Knowing How to Type
These come up constantly:
| Phrase | Devanagari | Use |
|---|---|---|
| Jai Shri Ram | जय श्री राम | Religious greeting |
| Satyameva Jayate | सत्यमेव जयते | National motto |
| Vasudhaiva Kutumbakam | वसुधैव कुटुम्बकम् | "The world is one family" |
| Ahimsa Paramo Dharma | अहिंसा परमो धर्म | Non-violence |
| Sarve Bhavantu Sukhinah | सर्वे भवन्तु सुखिनः | Peace prayer |
| Lokah Samastah | लोकाः समस्ताः | Well-being prayer |
| Aham Brahmasmi | अहं ब्रह्मास्मि | Mahavakya — "I am Brahman" |
| Tat Tvam Asi | तत् त्वम् असि | Mahavakya — "That thou art" |
Script Matching: Sanskrit in Hindi vs Sanskrit in Sanskrit
One thing people discover late: Hindi Devanagari and Sanskrit Devanagari are not the same in practice, even though they use the same script characters.
Sanskrit uses characters that Hindi has dropped:
- ळ (retroflex lateral approximant) — used in Vedic, dropped in Hindi
- ॡ (long retroflex vowel) — theoretical, rarely used
- Chandrabindu ँ usage differs between Sanskrit and Hindi
- Half forms — Sanskrit uses more traditional half-consonant forms that some fonts don't render correctly
If you're typing for a Sanskrit context (puja card, temple newsletter, Sanskrit-medium school) and the output looks slightly off compared to textbook Sanskrit, the likely culprit is font rendering of conjuncts and half-forms. Use a font designed for Sanskrit — Sanskrit 2003, Siddhanta, or Uttara — rather than generic Hindi Devanagari fonts.
Practical Workflow for Devotional Content
This is the most common use case: someone wants to type a shloka for a WhatsApp status, an Instagram post, a PDF for their puja group, or a PowerPoint for a temple event.
The cleanest approach:
- Find the shloka transliterated in ITRANS or IAST form (many Sanskrit learning sites have these)
- Paste the ITRANS/phonetic text into TranslitHub
- Switch the output to Devanagari
- Copy the Devanagari text
- Paste into your target app, applying a Devanagari font if needed
For WhatsApp and social media: just paste directly. Modern phones render Devanagari fine.
For Word documents and PDFs: set the font explicitly to Noto Serif Devanagari or Mangal before pasting. Don't trust the default font — it may not have all Sanskrit glyphs.
Unicode and Encoding Notes
Sanskrit on the web is always Unicode — specifically, the Devanagari Unicode block (U+0900–U+097F), with some Vedic Extensions (U+1CD0–U+1CFF) for accent marks.
If you're receiving Sanskrit text from older sources (pre-2000s digitization projects), you might get files encoded in ISCII or custom fonts like Shree-Dev or Kruti Dev. These need to be converted to Unicode before modern tools can process them. TranslitHub works exclusively with Unicode, so you'd need a separate ISCII-to-Unicode conversion step first.
For anything created in the last decade, this is a non-issue. All modern Sanskrit digital content is Unicode.
Typing Sanskrit well takes some practice — the consonant clusters, the aspirates, getting ṣ and ś right. But the fundamentals are learnable quickly, and once you've typed a few shlokas, the muscle memory kicks in. The alphabet is completely phonetic, which means if you know how to pronounce Sanskrit, you can learn to type it. That's more than you can say for English.