← Back to Blog
Dec 15, 2025 TDL Development 10 min read

Getting Started with TDL in Tally Prime

AK

Anil Kumar Sanyal

GST Expert & Founder

Tally Prime is a powerful accounting software, but did you know you can extend its capabilities? TDL (Tally Definition Language) is the proprietary language used to customize Tally. Whether you want to add a field to an invoice, create a custom report, or change the logic of entries, TDL is the key.

What is TDL?

TDL is a high-level, event-driven programming language. Unlike C++ or Java, it is specifically designed for data management and display within the Tally environment. Its syntax is based on "Definitions" – nearly everything in Tally (Menus, Reports, Forms, Lines, Fields) is a definition.

Basic Structure of TDL

The hierarchy of TDL components is as follows:

  • Report: The final output (like a Balance Sheet).
  • Form: The container for the content (like the page layout).
  • Part: Sections of the form (Header, Body, Footer).
  • Line: Rows within a part.
  • Field: The actual data element (Text, number, date).

Writing Your First TDL Code

Let's write a simple "Hello World" program that adds a new menu item to the Gateway of Tally.

[#Menu: Gateway of Tally] Add: Item: Hello World Report : Display: MyHelloReport [Report: MyHelloReport] Form: MyHelloForm [Form: MyHelloForm] Part: MyHelloPart [Part: MyHelloPart] Line: MyHelloLine [Line: MyHelloLine] Field: MyHelloField [Field: MyHelloField] Set as: "Hello from Kangra Hub!" Style: Large Bold Align: Center

How to Load TDL in Tally Prime?

  1. Save the code above in a text file with extension .txt or .tdl (e.g., hello.tdl).
  2. Open Tally Prime.
  3. Press F1 (Help) > TDLs & Add-ons.
  4. Press F4 (Manage Local TDLs).
  5. Set "Load selected TDL files on startup" to Yes.
  6. Browse and select your hello.tdl file.
  7. Press Enter to save. The TDL will load, and you should see your new menu item!

Why Learn TDL?

Learning TDL opens up immense possibilities. You can build vertical solutions for specific industries (like School management, Hospital billing) right inside Tally. It enhances your value as an accountant or developer.

Download Ready-made TDLs

Not ready to code yet? No problem. Visit our TDL Library to download useful, ready-to-use TDL files for free.

Explore our TDL Collection
Go to TDL Library