Convert txt to dic

Convert TXT to DIC

Format a TXT word list for plain-list, Hunspell, or application-specific DIC dictionaries.

Convert TXT files online

We don’t have a dedicated online converter for TXT to DIC yet, but you can convert TXT files online to these and more formats:

Want to convert TXT to DIC?

Let us know. We pick the conversions to add next by how many people ask for them.

How to convert txt to dic file

Custom spell-checkers, terminology tools, and dictionary engines often accept vocabulary only in a specific .dic layout. A word list maintained in .txt must therefore be cleaned and formatted to match the target program rather than merely renamed.

TXT files and their use

A .txt file is plain text with no required field structure. Text editors such as Notepad, TextEdit, Notepad++, and VS Code create TXT files; spreadsheets, databases, terminology systems, and scripts commonly export word lists to them.

A source file may contain one word per line, comma-separated terms, headings, definitions, duplicates, or ordinary prose. Only extracted, validated terms should be placed in a dictionary file.

DIC files and their variants

The .dic extension does not identify one universal dictionary format. Some applications use a UTF-8 word list with one entry per line, while others use Hunspell-compatible dictionaries, proprietary text layouts, or binary files.

A Hunspell .dic file normally contains a word count on its first line, followed by entries such as colour/AB. The optional flags are defined by a matching .aff file, which specifies encoding, affix rules, compound-word rules, and flag meanings. A DIC file without the correct AFF file cannot add valid inflection rules by itself.

A correctly formatted DIC file lets the target software recognize approved names, technical terms, abbreviations, and spelling variants. Plain-list dictionaries are compact and easy to edit, but they recognize only the literal entries supplied unless the application supports its own morphology rules.

Prepare the source list

  1. Check the target program's documentation and inspect a known working dictionary file in VS Code or Notepad++. Record its filename, encoding, first lines, required companion files, and entry syntax.
  2. Open the TXT source and remove headings, definitions, empty lines, punctuation-only entries, and terms that must not be accepted by the spell-checker.
  3. Place one accepted entry on each line. Keep phrases only when the target application's dictionary format supports multi-word entries.
  4. Choose a case policy before removing duplicates. Product names and abbreviations may require separate entries for Acme, ACME, and acme.
  5. Save the cleaned source as UTF-8 unless the target dictionary explicitly requires another encoding.

Create the required DIC format

For an application that documents a plain word-list DIC format, save the cleaned list with the required .dic filename through File → Save As. Changing the extension is valid only when the application explicitly treats its DIC file as a plain text list.

For a Hunspell target, copy the syntax of its existing dictionary and use its matching .aff file. Put the required entry count on the first line if the target's sample dictionary does so; the count excludes the count line. Add flags only when they are defined in that AFF file. Arbitrary flags do not create plurals, verb forms, or compound words.

In PowerShell 7, this command trims a UTF-8, one-term-per-line source, removes exact duplicate lines, adds a Hunspell-style count, and writes UTF-8 without a byte-order mark:

$w = Get-Content words.txt | ForEach-Object { $_.Trim() } | Where-Object { $_ } | Sort-Object -CaseSensitive -Unique; @($w.Count) + $w | Set-Content -Encoding utf8NoBOM custom.dic

Use the command only after confirming that the target accepts an unflagged Hunspell list and that custom.dic is installed or registered with the appropriate .aff file. For spreadsheet exports or repeatable imports, a PowerShell or Python script is safer than manual editing because filtering, duplicate handling, and entry counts remain reproducible.

Tools and compatibility checks

VS Code and Notepad++ are suitable for inspecting encoding, line endings, and sample dictionary syntax. PyGlossary can convert supported dictionary formats, but it is not a general solution for arbitrary TXT files or proprietary DIC variants; verify that its selected input and output plugins match the exact target format.

No generic online converter can reliably infer a DIC dialect. Avoid services that promise universal TXT-to-DIC conversion, especially for customer names, internal terminology, or other confidential vocabulary. Use an online text-processing service only when its output syntax and encoding can be verified against the target application's documentation.

Match the target encoding exactly. Hunspell AFF files commonly contain SET UTF-8; UTF-16, Windows-1252, or an unsupported byte-order mark can corrupt accented characters or cause the first entry to fail.

Test the installed dictionary with a normal word, an accented word, an uppercase term, and a custom entry. If loading fails, compare the filename, first line, encoding, line endings, installation location, and required companion files with a known working dictionary.

Information about file extensions and file types is provided by File-Extensions.org

Frequently asked questions

Will converting a TXT word list to DIC keep all my words?

Usually, if the TXT file has one word per line, the words are carried over as dictionary entries. Blank lines, comments, duplicate entries, and extra columns may be removed or interpreted differently depending on the DIC format.

Does a DIC file need a word count at the top?

A Hunspell-style DIC file usually begins with the number of entries, while some plain-list or application-specific DIC files do not. Using the wrong convention can make the dictionary fail to load or cause entries to be skipped.

Why does my converted DIC dictionary not work in my application?

DIC is not one universal format, so an application may expect a particular header, character encoding, line structure, or Hunspell flags. A plain one-word-per-line file may therefore be valid text but incompatible with the target application's dictionary parser.

Will TXT to DIC preserve accents and special characters?

It can preserve them when the source and target use a compatible character encoding. If the encoding is mismatched, accented words or non-Latin characters may appear corrupted or be rejected.

Already downloaded

This file has already been downloaded. For your privacy it was deleted from our server right after the download, so it cannot be downloaded again. To get it once more, convert the file again.