Hindi works well on screens now: phones, browsers and messaging apps all handle it without any setup. Problems start when Hindi text moves between files and programs, and they show up in three recognisable ways: empty boxes, question marks, or text that turns into nonsense when copied. Each has a different cause, and knowing which one you are looking at tells you the fix.
How Hindi is stored
Modern Hindi text is stored as Unicode, the standard that gives every character in every writing system its own number. Devanagari, the script Hindi is written in, has its own block of code points, from U+0900 to U+097F. "क" is U+0915, "ा" is U+093E, and so on. The Unicode converter shows the code point behind any character you paste in.
Devanagari also has a step that Latin text does not: shaping. A conjunct like "क्ष" is stored as three code points, क, the virama ् and ष, and the font combines them into one shape when it is drawn. Vowel signs such as ि are stored after the consonant but drawn before it. So correct Hindi needs two things: Unicode text, and a font and rendering engine that know how to shape Devanagari.
Failure 1: boxes
Empty rectangles, sometimes called tofu, mean the text is fine but the font being used to draw it has no Devanagari letters. The program falls back to a "missing glyph" box for each one.
This happens most often when a PDF is generated with a basic built-in font. The text is in the file correctly; there is simply nothing to draw it with. Generating the PDF again with a font that includes Devanagari, such as Nirmala UI on Windows, Kohinoor Devanagari on macOS or Noto Sans Devanagari anywhere, fixes it.
Failure 2: question marks
Question marks are a harsher version of the same problem: the program that created the file replaced every character it could not encode with "?" at the moment of saving. Unlike boxes, the original letters are gone from that file. You have to go back to the source and convert again with a Devanagari-capable font.
Several converters on this site use standard Latin PDF fonts, and they say so: the text to PDF tool prints Latin characters only, the Excel to PDF converter prints characters outside that set as question marks and warns you, and the EPUB to PDF converter refuses a book that is mostly in Devanagari rather than fill it with them. For Hindi, the HTML to PDF and DOCX to PDF converters work, because they draw each page with your browser's own fonts, which include Devanagari on every current system. The trade-off is that those pages are stored as images, so the text in the PDF cannot be selected or searched.
Failure 3: gibberish when you copy
You copy a paragraph of perfectly readable Hindi from an old document, paste it somewhere else, and get something like fgUnh esa ;g okD; gS. This is not corruption. The document was typed in a legacy font such as Kruti Dev, Chanakya or DevLys, which were widely used in Indian offices, courts and newspapers before Unicode was common.
Those fonts work by drawing Devanagari shapes in place of English letters. The file actually stores English characters, and only that particular font makes them look like Hindi. Copy the text into anything using a normal font and the English letters reappear. The fix is to convert the text from the legacy encoding to Unicode with a converter built for that specific font, then retype or proofread, since the conversions are not always perfect.
Getting Hindi text out of a scan
A scanned form or a photo of a printed page has no text at all, only pixels. To get editable Hindi from it, you need OCR with the Hindi language model. The image OCR tool offers Hindi, and English plus Hindi together for mixed documents such as forms with English labels. The PDF OCR tool offers Hindi for scanned PDFs: it gives you the recognised text to copy, but because of the font limit described above, the PDF it saves stays image-only for Hindi. Either way the text you copy is Unicode, so it can be pasted anywhere.
OCR on Devanagari is less accurate than on English, especially for conjuncts, small print and low-contrast scans. Scan at 300 DPI or more, keep the page flat and well lit, and proofread the result, paying particular attention to matras and half letters, which are the most common mistakes.