March 25, 202610 min read

How to Type Hindi in Notepad and Text Editors

How to type Hindi in Notepad, Notepad++, Sublime Text, VS Code, and other plain text editors — covering input setup, encoding settings, and font configuration.

notepad text editor hindi typing plain text
Ad 336x280

Notepad doesn't look like it'd have any problems with Hindi. It's the simplest text editor on Windows — how hard can it be? But I can't count the number of times someone has typed Hindi in Notepad, saved the file, opened it again, and found garbled characters staring back at them.

The issue isn't Notepad's ability to accept Hindi input. That part works fine. The problem is encoding — how the file stores those Hindi characters on disk. Get the encoding right and everything works perfectly. Get it wrong and your text becomes a sequence of question marks and accented Latin characters.

Here's how to type Hindi correctly in Notepad and several other popular text editors, with the encoding pitfalls handled upfront.


Typing Hindi in Windows Notepad

Prerequisites

You need Hindi input configured on Windows:

  1. Settings → Time & Language → Language & Region → Add a Language → Hindi (India)
  2. Choose Hindi Phonetic keyboard if you want transliteration-style typing
  3. Switch between English and Hindi with Win + Spacebar

Typing

  1. Open Notepad
  2. Press Win + Spacebar to switch to Hindi
  3. Start typing — Devanagari text appears immediately
  4. The IME suggestion popup shows alternatives as you type (if using phonetic input)
  5. Press Spacebar to accept the top suggestion or number keys to pick alternatives
That part is effortless. The important part is what happens when you save.

Saving with the Correct Encoding

This is the critical step. When saving your file:

  1. File → Save As
  2. Next to "Encoding," select UTF-8 (or UTF-8 with BOM)
  3. Give it a filename and save
Why UTF-8 matters: Hindi characters are part of the Unicode standard. UTF-8 is the encoding that properly stores Unicode characters. If you save as ANSI (the old default on some Windows versions), Hindi characters get mangled because ANSI can't represent Devanagari. Good news: Windows 11 and recent Windows 10 builds default to UTF-8 in Notepad. But older installations might still default to ANSI. Always double-check.

Opening Existing Hindi Text Files

If you open a text file with Hindi content and it looks like garbled characters:

  1. Close the file
  2. Reopen with File → Open
  3. Change the "Encoding" dropdown (bottom of the dialog) to UTF-8
  4. Click Open
If the original file was saved in UTF-8, the Hindi text should now display correctly.

Notepad's Font

Notepad's default font (Consolas or Lucida Console on older Windows) supports basic Devanagari rendering. But if Hindi text looks cramped or some characters look wrong, change the font:

  1. Format → Font (or Settings → Font in newer Notepad)
  2. Select Nirmala UI or Noto Sans Devanagari
  3. These fonts render Devanagari glyphs, matras, and conjuncts properly
Note that Notepad uses a single font for the entire document. You can't have one font for English and another for Hindi in the same file. Pick a font that handles both scripts — Nirmala UI is the best choice since it covers Latin and Devanagari.

Typing Hindi in Notepad++

Notepad++ is the most popular free text editor on Windows, and it handles Hindi much better than plain Notepad — primarily because of its robust encoding support.

Setup

  1. Make sure Hindi input is enabled on your system (same Win + Spacebar setup)
  2. Open Notepad++
  3. Before typing any Hindi, set the encoding: Encoding → Encode in UTF-8

Typing Hindi

Switch to Hindi input (Win + Spacebar), type in the editor. Hindi text appears normally.

Encoding Verification

The current encoding is always visible in the bottom status bar of Notepad++. It should say "UTF-8" or "UTF-8-BOM." If it says "ANSI," your Hindi text will be corrupted on save. Change it via Encoding → Convert to UTF-8.

Important distinction: "Encode in UTF-8" sets the encoding for new content. "Convert to UTF-8" re-encodes existing content from its current encoding to UTF-8. If you already typed Hindi in ANSI mode, you need "Convert" to fix the existing text.

Font Configuration

Settings → Style Configurator → Global Styles → Default Style → Font name.

Set to Nirmala UI, Consolas (which has Devanagari fallback on modern Windows), or Noto Sans Devanagari.

You can also set the font size here. For Hindi text, sizes 12-14pt are more readable than the typical 10pt used for code.

Syntax Highlighting with Hindi

If you're editing HTML, XML, or Markdown files that contain Hindi text, Notepad++ handles syntax highlighting correctly — the Hindi content inside tags or markup is rendered without interfering with the highlighting.


Typing Hindi in VS Code

Visual Studio Code is increasingly popular even among non-developers — writers, students, and content creators use it for its markdown support and versatility.

Hindi Input

VS Code accepts Hindi input from the Windows system keyboard without any additional configuration. Switch to Hindi (Win + Spacebar), type in the editor. Works in any file type — .txt, .md, .html, .json, anything.

Encoding

VS Code defaults to UTF-8, which is perfect for Hindi. You can verify and change encoding by clicking the encoding indicator in the bottom status bar (usually says "UTF-8").

If you open a file with garbled Hindi, click the encoding indicator → "Reopen with Encoding" → select UTF-8.

Font Configuration

Open Settings (Ctrl + ,) and search for "font family." The default editor font is typically Consolas or a monospace font. For mixed English-Hindi editing, add a Devanagari font as a fallback:

"editor.fontFamily": "Consolas, 'Nirmala UI', monospace"

This tells VS Code to use Consolas for Latin characters and fall back to Nirmala UI for Devanagari. Both scripts render cleanly side by side.

Markdown Preview with Hindi

If you write Hindi in Markdown files (.md), the built-in preview (Ctrl + Shift + V) renders Devanagari text correctly. This is handy for drafting Hindi blog posts, documentation, or notes in Markdown format.


Typing Hindi in Sublime Text

Sublime Text has a known quirk with IME (Input Method Editor) input. Hindi typing works but the composition window might appear in an odd position or lag slightly.

Setup

  1. Ensure Hindi input is enabled on your system
  2. Open Sublime Text
  3. Set encoding: File → Save with Encoding → UTF-8

Font

Preferences → Settings → add to user settings:

{
    "font_face": "Nirmala UI",
    "font_size": 13
}

Or if you want a monospace font for code with Hindi support, use the font fallback approach in your preferences.

Known Issues

Sublime Text's IME handling on Windows is less polished than VS Code's. The transliteration suggestion popup might not position correctly, and there can be a slight delay between typing and character rendering. If this bothers you, type Hindi content in another editor or at transliterate.in and paste into Sublime Text.


Typing Hindi in Vim / Neovim

For terminal-based editors, Hindi typing depends on the terminal emulator and the input framework.

In Windows Terminal

  1. Switch to Hindi input (Win + Spacebar)
  2. Open Vim or Neovim
  3. Enter insert mode (press i)
  4. Type Hindi — it should work if Windows Terminal's font supports Devanagari

Font for Windows Terminal

In Windows Terminal settings, set the font to one that covers Devanagari. "Cascadia Code" (the default) has limited Devanagari support. Better options:

  • Set the font to "Nirmala UI" for full Devanagari support (though it's not monospace)
  • Or configure a font fallback in the terminal settings JSON

Encoding in Vim

Set UTF-8 encoding in your vimrc or init.vim:

set encoding=utf-8
set fileencoding=utf-8

This ensures Hindi text is saved correctly.


The Universal Fallback: Transliterate and Paste

For any text editor — no matter how niche or old — the copy-paste method always works:

  1. Open transliterate.in in your browser
  2. Type in English: "yah ek pariksha hai"
  3. Get Hindi: यह एक परीक्षा है
  4. Copy (Ctrl + C)
  5. Paste into your text editor (Ctrl + V)
  6. Save with UTF-8 encoding
This is my recommendation for anyone who uses a text editor that doesn't play well with system IME input, or for people who only occasionally need Hindi text in their files.

Encoding Deep Dive: Why Hindi Text Gets Corrupted

Understanding encoding helps prevent and fix corrupted Hindi text.

What is UTF-8?

UTF-8 is a character encoding that can represent every character in the Unicode standard, including all Devanagari characters, Tamil, Bengali, Telugu — every Indian script. Each Hindi character like अ is stored as a specific byte sequence (in this case, E0 A4 85).

What is ANSI?

ANSI (Windows-1252 on Western systems) is a legacy encoding that only supports 256 characters — basically English and some Western European characters. Devanagari characters don't exist in ANSI. When you save Hindi text as ANSI, each Hindi character gets replaced with whatever garbage the encoder can fit into one byte.

What is UTF-16?

Another Unicode encoding. Some older Windows applications and APIs use UTF-16 internally. Notepad offers "UTF-16 LE" and "UTF-16 BE" as encoding options. These work fine for Hindi but are less standard than UTF-8 for text files. Stick with UTF-8 unless you have a specific reason.

BOM (Byte Order Mark)

"UTF-8 with BOM" adds a special invisible character at the beginning of the file that signals the encoding. Some applications need this marker to correctly identify UTF-8. Others (especially on Linux) don't expect it and might display a weird character at the file's start. For maximum compatibility, "UTF-8" without BOM is the safest default.


Batch Fixing Encoding in Multiple Files

If you have many text files with corrupted Hindi text (all saved in the wrong encoding), you can batch-convert them:

In Notepad++

  1. Open the file with garbled text
  2. Encoding → select the original encoding the file was saved in (try UTF-8, if garbled try other options)
  3. Once text displays correctly, Encoding → Convert to UTF-8
  4. Save

In VS Code

  1. Open the file
  2. Click the encoding indicator in the status bar
  3. "Reopen with Encoding" → try different options until Hindi text displays correctly
  4. Then "Save with Encoding" → UTF-8

Practical Tips

  1. Always check encoding before typing Hindi — take one second to verify UTF-8 is set. This saves hours of frustration.
  1. Use Nirmala UI as your editor font — it handles both English and Hindi in the same document better than any other single font.
  1. For filenames in Hindi — Windows supports Hindi filenames (saved as UTF-16 internally by NTFS). But not all applications handle Hindi filenames well. For maximum compatibility, keep filenames in English and put Hindi content inside the file.
  1. When sharing text files — if the recipient sees garbled text, the first thing to check is encoding. Tell them to open the file with UTF-8 encoding specified.
  1. Plain text vs rich text — for Hindi, plain text (.txt) with UTF-8 encoding is more portable and less error-prone than rich text (.rtf). Rich text files can embed font information, but the font dependency creates its own problems.
The core message is simple: Hindi in text editors works fine — it's the encoding that trips people up. Set UTF-8, pick a Devanagari-capable font, and your Hindi text will survive saves, transfers, and sharing without any corruption.
Ad 728x90