MatterSuite

Need Custom Legal Software? We build 100% customizable legal software for corporate teams. Let's Discuss.
MatterSuite

LEDES File Format Explained: Structure, Fields, and How It Works

LEDES File Format Explained

LEDES is a standard file format that allows law firms to send invoices to be automatically validated in your e-billing system. The most popular format within the US is LEDES 1998B. It is a plain text file with a pipe delimiter containing 24 fields. It contains one line for each invoice item.

If you are receiving invoices from external legal counsel, you may be receiving LEDES files already. Alternatively, you may have specified this format in your billing guidelines. This article will show you how these files are constructed, explain what information is contained within each field of the LEDES 1998B format, and help you to decide on the most suitable format for your department.

In brief

  • LEDES is a family of invoice formats: 1998B, 1998BI, and XML versions 2.0, 2.1, and 2.2.
  • A 1998B file has 24 fields. Each row is one line item, and invoice-level data repeats on every row.
  • 1998BI has 52 fields and adds tax, currency, and party details for international billing.
  • The XML formats handle complex taxes and alternative fee arrangements, and the LEDES Oversight Committee updated them in 2023 and April 2026.
  • Name the format in your outside counsel guidelines, then validate every file when it arrives.

What is a LEDES file?

The information within an invoice is structured into a LEDES file. Every fee and expense item in an invoice will be represented in a record containing specific fields. The file can then be opened in an e-billing system to be validated and reported on, according to your set criteria, without the information needing to be retyped.

Who maintains the LEDES standard?

The LEDES standard is managed by the LEDES Oversight Committee (LOC). They publish the formats on their website https://ledes.org/. The project started informally in 1995, led by PricewaterhouseCoopers. It was incorporated as a non-profit organisation in 2001. The LOC also manages the ‘code lists’ within the files. This includes ‘timekeeper category codes’ and different sets of codes within the ‘UTBMS’.

LEDES vs. UTBMS

Within the LEDES, task codes, activity codes, and expense codes will appear alongside the quantity of hours, rate, and total values. In order to understand this file, it is important to know how the task, activity, and expense codes function. As each code has its own structure, having an understanding of the UTBMS code guide makes it far easier to understand coded entries.

Why corporate legal departments require LEDES

By using structured data, the calculations, rates, and codes on each line can be validated automatically by the legal e-billing software. It also means that comparisons can be made between spending at different firms and against different matters, as all firms are providing information in the same fields in the same order. Most departments include requirements for this format in their external counsel guidelines. Well-structured guidelines in this area form a fundamental part of managing external counsel costs. They ensure that invoices are presented in a specific way, with certain codes and rates, and so the invoices can be validated against these standards.

LEDES formats at a glance

LEDES is not one format. The LOC maintains several, and they differ in size, tax support, and how they are encoded.

Format
File type
SizeLatest versionNotes
LEDES 1998BASCII text, pipe-delimited24 fieldsFormat documentation Rev 7-2014 (adds timekeeper classifications)The most widely used e-billing standard in the US. The LOC does not plan to modify it.
LEDES 1998BIASCII text, pipe-delimited52 fieldsVer 5, January 2020Beta in 2005 (33 fields), Ver 1 in 2006 (50 fields), Ver 2 in April 2008 (52 fields). The LOC does not plan to modify it.
LEDES XML eBilling 2.0XML (XSD)15 segments, 172 data elements2.0.4, 2023Supports multiple taxes per line item and alternative fee arrangements.
LEDES XML eBilling 2.1XML (XSD)16 segments, 205 data elements2.1.5, April 2026191 data elements at launch in April 2008. 205 since 2.1.4 (March 2023).
LEDES XML eBilling 2.2XML (XSD)18 segments, 216 data elements2.2.2, April 2026Adds tiered tax support.

Two older formats are retired. LEDES 1998 was quickly replaced by 1998B, and its documentation is no longer available. The LOC no longer supports XML 2000.

Sources: 

How a LEDES 1998B file is structured

LEDES 1998B is a pipe-delimited ASCII text file with 24 fields. Each line represents either a fee, expense line item, or adjustment line item in the invoice. Data relating to the invoice appears in all lines.

The three parts of the file

A 1998B file has three parts, in this order:

  1. The format line, LEDES1998B[]. This lets the receiving system know what format to expect.
  2. A header row listing the 24 field names.
  3. One data row for each fee, expense, or invoice-level adjustment.

Pipe delimiters and the [] line terminator

A pipe character (|) separates the fields in each row, and [] ends each row. If a field does not apply to a record, it will be blank. Pipes will appear in its place to ensure that columns align correctly with the header. Since the pipe character is used as a separator, including any pipes within description fields will cause all subsequent fields to shift 1 column to the right. This is one of the most common reasons that files are rejected.

Reading the sample:

  1. The first line is the format line.
  2. The second line is the header row with all 24 field names.
  3. The third line is a fee line (F): 2.5 hours at 575.00 is 1437.50, coded to task L330 and activity A101.
  4. The fourth line is an expense line (E): one unit at 300.00, coded to expense code E119. The task, activity, and timekeeper fields are empty because an expense has no timekeeper.
  5. INVOICE_TOTAL is 1737.50 on both lines because invoice-level data repeats on every row.

Why invoice-level data repeats

As this file is flat and structured, duplicates appear in each line. This means the invoice reference, date, and total value will be repeated in every line. For a reviewer, this is a built-in consistency check: every row of the file should carry the same invoice-level values, and INVOICE_TOTAL should equal the sum of all the LINE_ITEM_TOTAL values.

The 24 LEDES 1998B fields explained

There are 24 fields divided into 5 categories. They are Invoice, Client/Matter, Line Item, Codes, and Timekeeper. The field names and order have been taken from the LEDES 1998B format documentation (Rev 7-2014), which can be viewed at https://ledes.org/ledes-98b-format/. However, depending on your client’s requirements for e-billing, different fields may be required and to varying levels of rigor. Please verify with your client.

#FieldGroupWhat it holdsWhat reviewers should check
1INVOICE_DATEInvoiceDate the invoice was issued, as YYYYMMDDFalls after the billing end date
2INVOICE_NUMBERInvoiceThe firm’s invoice numberNot a duplicate of an earlier invoice from the same firm
3CLIENT_IDClient and matterYour company’s ID in the firm’s billing systemMatches the ID in your system
4LAW_FIRM_MATTER_IDClient and matterThe firm’s own matter numberMatches the firm’s matter in your records
5INVOICE_TOTALInvoiceTotal amount of the invoiceEquals the sum of every LINE_ITEM_TOTAL
6BILLING_START_DATEInvoiceFirst day of the billing periodEarlier than or equal to every line item date
7BILLING_END_DATEInvoiceLast day of the billing periodLater than or equal to every line item date
8INVOICE_DESCRIPTIONInvoiceFree-text description of the invoiceComplete, with no stray pipe characters
9LINE_ITEM_NUMBERLine itemSequence number of the lineUnique within the invoice
10EXP/FEE/INV_ADJ_TYPELine itemLine type: F, E, IF, or IEMatches the kind of charge, and the right code fields are filled
11LINE_ITEM_NUMBER_OF_UNITSLine itemHours for a fee, or quantity for an expenseReasonable against your timekeeping rules
12LINE_ITEM_ADJUSTMENT_AMOUNTLine itemDiscount (negative) or premium (positive) on the lineNegotiated discounts appear where expected
13LINE_ITEM_TOTALLine itemTotal for the lineEquals units times unit cost, plus the adjustment
14LINE_ITEM_DATELine itemDate the work was done or the cost incurredFalls inside the billing period
15LINE_ITEM_TASK_CODECodesUTBMS task code for a fee lineFits the matter’s current stage
16LINE_ITEM_EXPENSE_CODECodesUTBMS expense code for an expense lineAllowed, or pre-approved, under your guidelines
17LINE_ITEM_ACTIVITY_CODECodesUTBMS activity code for a fee lineMakes sense with the task code
18TIMEKEEPER_IDTimekeeperThe firm’s ID for the person who did the workOn your approved timekeeper list
19LINE_ITEM_DESCRIPTIONLine itemNarrative of the work or expenseSpecific, not vague or duplicated
20LAW_FIRM_IDInvoiceThe firm’s identifier, often its tax IDMatches the vendor record
21LINE_ITEM_UNIT_COSTLine itemHourly rate for a fee, or unit price for an expenseMatches the approved rate for that person
22TIMEKEEPER_NAMETimekeeperThe timekeeper’s nameMatches the ID in field 18
23TIMEKEEPER_CLASSIFICATIONTimekeeperRole code from the LOC timekeeper classification listMatches the role the approved rate was set for
24CLIENT_MATTER_IDClient and matterYour company’s matter numberMatches your matter record, so the invoice reaches the right matter

The code fields are where LEDES meets UTBMS. These fields contain values from the UTBMS code sets. If someone is familiar with interpreting UTBMS codes then they will be able to easily see if the combination of task and activity does not match.

Line-item types: F, E, IF, and IE

Field 10 tells the system what kind of line it is reading:

  • F is a fee line.
  • E is an expense line.
  • IF is an invoice-level adjustment to fees.
  • IE is an invoice-level adjustment to expenses.

Task/Activity codes are used on fee lines, while expense codes are used on expense lines. The adjustment codes are used at invoice level when the adjustment cannot be attributed to one timekeeper, for example, discounts across an entire invoice.

LEDES 1998BI: what the 28 extra fields add

LEDES 1998BI is an international edition of 1998B and has 28 additional fields to give a total of 52 fields. This standard covers all the fields included in 1998B. It was proposed by the LITIG group within the UK legal services industry in 2004. A beta version was approved by the LOC in 2005. The standard was ratified in 2006. One tax can be assigned to each line item.

Additional fields include taxation information, currency, and firm/client information, including name and address. 1998BI must be used if VAT/taxes are applied to invoices, or if a matter is being invoiced in another currency.

It has been stated that the 1998BI standard will no longer be updated. Global submission issues will be addressed through the LEDES XML eBilling formats instead. Its version history runs from a 33-field beta in 2005 to 50 fields in Ver 1 (2006) and 52 fields in Ver 2 (April 2008), and Ver 5 was ratified in January 2020.

LEDES XML formats (2.0, 2.1, 2.2) explained

LEDES XML eBilling formats store an invoice as XML instead of a flat text file. It can therefore contain more complex data than in the 1998B format, such as multiple taxes, tax deductions, credits, and graduated taxes. There are currently three active versions of the LEDES XML format. These are versions 2.0, 2.1, and 2.2.

How XML segments are organized

Data within an XML file is grouped into segments. Within segments are data elements. Data elements contain individual pieces of data, similar to fields within a flat text file. Data elements have been assigned names based on which segment they belong to, such as @INVOICE.inv_desc or @FEE.task_code. The formats include segments for invoice data, matter data, fees, expenses, taxes, timekeeper summaries, and @EXTEND_HEADER and @EXTEND_DATA segments for client-specific data.

XML 2.0 vs. 2.1 vs. 2.2

VersionRatifiedSegmentsWhat it adds
2200615Multiple taxes on line items and alternative fee arrangement support
2.1April 200816Withholding tax, credit note support, and invoice-level global extensibility
2.2202018Tiered tax support

Each higher version builds on the one before it, so 2.2 carries the 2.1 and 2.0 capabilities too.

What changed in 2023 and April 2026

Changes have been made to versions 2.0.4, 2.1.4 and 2.2.1 of the standard. This was ratified by the LOC Board in March 2023, and an update was published on April 21st 2023. A press release was published on 11th May 2023.

 Changes include:

  • Aligned base fields across the three versions, so 2.0.4 gained fields that 2.1 and 2.2 already had and became more versatile.
  • Field definitions have changed due to UTBMS code sets including codes with more than 4 characters.
  • A redesigned data string for the case where a timekeeper’s rate is approved in one currency but the matter is billed in another, with a few added fields and adjusted validation rules.
  • A refined invoice calculation.

Law firms should check that a client’s vendor system can run the new schema, otherwise, the invoice may fail validation.

Version 2.1.5 has been given approval by the Board in April 2026. It fixes an arithmetic issue in version 2.1.4 (and 2.2.2) where client monies were being double-counted in the total invoice amount.

What your e-billing system checks when a LEDES file arrives

When a firm submits a LEDES file, your e-billing software runs file-level checks before any person reviews a line. Typical checks are:

  • The format line and header row are present and correct.
  • Every row has the expected number of fields.
  • Dates are in the required format, YYYYMMDD in 1998B.
  • Invoice math adds up: units times unit cost plus the adjustment equals the line total, and the line totals equal the invoice total.
  • Required fields are filled in.
  • The code fields hold valid values for the matter’s code set.
  • Matter and timekeeper IDs match your records, and rates match the approved rates.

If files pass validation, they will be sent for processing. If they fail validation, they will be returned to the firm with an error message. Standardized error messages have been published by the LOC. Version 2 was ratified in September 2024 to allow systems to provide consistent error messages. Once a file passes validation, the remaining process from submission to approval and payment should be followed as set out in a good legal e-billing guide.

Which LEDES format should your legal department require?

Most US-only hourly billing works with LEDES 1998B, and international, tax, or complex fee work points to 1998BI or XML.

Your situationFormat to considerWhy
US-only hourly billing1998BThe most widely used US standard. It does not support taxes on legal fees.
International billing with one tax per line item1998BIAdds tax, currency, and party fields.
Multiple taxes, withholding, or credit notesXML 2.1 or 2.22.0 supports multiple taxes. 2.1 adds withholding and credit notes.
Tiered taxesXML 2.2.x2.2 adds tiered tax support.
Alternative fee arrangements and complex ratesXML 2.xThe XML formats support alternative fee arrangements.
Rates approved in one currency and billed in anotherXML 2.0.4, 2.1.4, 2.2.1, or laterThe 2023 updates redesigned the data string for this case.

Before you require a format, confirm that your e-billing software supports the exact version. Then put the requirement in your outside counsel guidelines.

Common LEDES invoice errors and how to fix them

Most rejected files fail for a handful of reasons, and most are quick to fix once you can see the cause.

ErrorLikely causeFix
Line total does not matchUnits times unit cost plus adjustment does not equal LINE_ITEM_TOTAL, often because of rounding or a discount applied only to the totalRecalculate the line, including the adjustment field
Invoice total does not matchINVOICE_TOTAL differs from the sum of the line totalsRecalculate the invoice total from the lines and resubmit
Date format rejectedDates exported as MM/DD/YYYY or with separatorsExport dates as YYYYMMDD
Missing or invalid UTBMS codeTask or expense code blank, or not valid for the matter’s code setAdd a valid code from the code set your guidelines specify
Unapproved rate or timekeeperLINE_ITEM_UNIT_COST or TIMEKEEPER_ID does not match your approved listCorrect the rate or ID, or get the change approved first
Unknown matter IDCLIENT_MATTER_ID does not match a matter in your systemUse the matter number you assigned
Invoice covers several mattersThe system expects one invoice per matterSplit the invoice by matter, if your system requires it
Wrong column countA stray pipe or line break inside a description shifts the fieldsRemove the pipe or line break from the narrative
Missing format line or headerFile exported without the first linesRe-export with LEDES1998B[] and the header row

When a file keeps failing, ask the firm to send a corrected file, not to retype lines by hand. A file that someone edits manually is easy to break again.

Benefits and limitations of LEDES for in-house teams

Benefits

LEDES lets your e-billing system validate every line automatically, which catches math, rate, and code problems before a person reads the invoice. As data is in a standard format between firms and matters, spend can be more easily compared. As mathematical calculations have already been checked, reviewers can focus on more subjective issues such as whether an item is necessary.

Limitations

Not every firm can produce every format. This could be especially difficult for smaller firms or those working across multiple countries. Please confirm with your firms what they can do in terms of this format. The data within the file isn’t validated for content. Even if a line passes all validation checks, it may still have unnecessary work. Therefore guidance and review is still needed. Although UTBMS codes are included, it is not enforced that they are used correctly by firms. Whether codes are required and how strictly this should be applied depends on your guidance.

When to accept PDF invoices

Sometimes PDF invoices will be accepted in certain departments, for example with smaller firms or one-off matters. If a firm only bills you twice per year, requiring them to send you invoices in LEDES format may be very costly in terms of losing goodwill, without much gain in the extra data. Depending on your legal e-billing software, you may be able to extract data from a PDF invoice. Please check with your system. Where possible, you should aim to request invoices in LEDES format, and only accept PDFs as an exception.

LEDES and AI-era billing

This is a developing area, so treat it as a trend and not a settled practice. Many in-house legal teams are asking law firms about their use of generative AI. ACC provides a useful list of questions to ask external law firms regarding Generative AI. In this list, it is recommended that being transparent on billing constitutes a positive sign. However, if the law firm does not provide transparency on AI-enhanced billing, then this requires further discussion.

As LEDES formats and UTBMS were not created with generative AI in mind, expectations of transparency on AI should be included in guidance for external law firms and within contracts. If you wish for law firms to advise when AI has had an impact on billing, include this within guidance and consider what format this information should be given in. This could be in the line item description or in a discrete report.

Conclusion: Treat LEDES as data, not just a file

Following a standardized LEDES format allows teams to detect errors, ensure that correct rates and UTBMS codes have been applied, and compare costs between law firms. However, it cannot be guaranteed that the work that has been charged is appropriate. It is, therefore, very important that clear billing rules are in place, and the invoices are manually reviewed.

MatterSuite allows legal teams to perform LEDES and UTBMS compliance, rule-based verification of invoices, and gain dashboards into legal spend. Bulk processing of invoices means that it is quick to identify breaches of your policies. Teams can build an auditable trail and understand how legal costs are spread between matters, law firms and timekeepers. LEDES can therefore be a useful tool for controlling and managing spend on external legal counsel.

Frequently Asked Questions