File naming rules under Japan's Electronic Books Preservation Act — examples and common mistakes

File naming rules under Japan's Electronic Books Preservation Act mean putting the transaction date, amount and counterparty into the file name of every invoice or receipt you received by email or online, in a consistent order, so that the law's search requirement is met without dedicated software.

Updated 2026-09-18. Based on the National Tax Agency's Electronic Books Preservation Act Q&A [Electronic transactions] (July 2026). "Q" numbers below refer to that Q&A. This page explains requirements of Japanese law.

Key points

What is required when keeping electronic transaction data

The following are required (Q18). File naming rules relate to the third item.

  1. Take a measure against tampering: a timestamp, a system that keeps a history of corrections and deletions (or does not allow them), or internal rules for preventing corrections and deletions. The National Tax Agency publishes sample internal rules (reference materials, in Japanese).
  2. Have a display and a printer so the data can be shown on screen or printed promptly.
  3. Make the data searchable by the transaction date (or another date), the amount and the counterparty.
  4. If you use a program you developed yourself, keep a document describing the system.

What the search requirement means

The National Tax Agency lists three search functions (Q48).

  1. You can search by the transaction date (or another date), the amount and the counterparty
  2. You can search dates and amounts by range
  3. You can combine two or more items in one search

If you are ready to respond to a tax official's request for the data to be shown or handed over (the "download request"), items 2 and 3 are not needed. On top of that, if either of the following applies, none of items 1 to 3 are needed (Q48, Q51, Q52).

If there is a reasonable cause, such as not having a system in place yet, and you can provide the data and its printouts when a tax official asks, a grace measure currently allows you to keep the data without meeting the search requirement or the anti-tampering measure (Q93).

Even when the search requirement does not apply, consistent file names save time when you look for a document or hand files to your tax accountant.

File naming examples

National Tax Agency materials show the following patterns. Each puts the date, the counterparty and the amount in the name, in the same order every time.

Pattern Example Source
date_counterparty_amount 20210131_(株)霞商店_110000 Q19, Q50
date_amount_counterparty 20240331_110000_(株)霞商店.pdf Leaflet "Check how to keep electronic transaction data" (July 2023)
A folder per counterparty, with date_amount as the file name (株)霞商店/20240331_110000.pdf Q50 (separating folders by counterparty)

Adding the document type (invoice, receipt, etc.) or the invoice number makes the content clear at a glance. Even then, keep the three items in the same position in every file name.

What to decide first

Many answers in the Q&A say "either is fine, but be consistent", and that is where people get stuck. The last column shows one way to decide.

Item What the National Tax Agency says, and how to decide One way to decide
Western calendar or Japanese era Either is fine, but mixing them gets in the way of searching, so use one (Q50). Western calendar, 8 digits (YYYYMMDD). Sorting by name then sorts by date
Which date to use Normally the date of the transaction. For a document that records a month of transactions together, you may use the issue or receipt date and the total amount, as long as you do so consistently within the tax period (Q55). The issue date printed on the document
Tax included or excluded Normally match your bookkeeping method (tax-excluded or tax-included accounting), but the amount written on the document is also acceptable (Q57). The tax-inclusive amount printed on the document
Documents without an amount For documents such as unit-price contracts, the amount may be 0 yen or blank. If blank, make sure blank entries can be searched (Q58). 0
Quotations with several amounts Decide internally which amount to use and do not change the rule during the tax period (Q56). The largest total
How to write the counterparty Whether to write 株式会社 in full or shorten it to (株). The National Tax Agency examples use (株). Mixed spellings cause missed search results, so pick one. Always shorten to (株)

If several people handle files, write the rule down in one line and share it. What the search requirement itself demands, and how the file-name method compares with an index book, is covered in the search requirement explained.

Common mistakes

  1. Dates are written differently from file to file. If 2024-1-5, 20240105 and R6.1.5 are mixed, sorting by name does not sort by date. With a fixed-width YYYYMMDD, name order is date order.
  2. The order of the items changes midway. The National Tax Agency describes entering the items in a consistent order (Q50). If several people handle files, write the rule down and share it.
  3. Commas or 円 are added to some amounts but not others. 110,000 and 110000 are different strings, so searching for one misses the other. The National Tax Agency examples use digits only.
  4. Counterparty names are not consistent. If 株式会社霞商店, (株)霞商店 and カスミ商店 are mixed, a single search cannot find them all.
  5. A PDF containing several invoices is named as one file. The Q&A describes splitting the PDF by transaction and naming each part. Split it without changing the content (Q54).
  6. Files are named, but there is no measure against tampering. You need, for example, internal rules that you set and follow (Q19).
  7. Files are stored all over the place. Storing data in more than one place is allowed, but data scattered without reason that cannot be produced promptly is not (Q32).
  8. Invoices you sent are not kept. Data you send must be kept as well as data you receive (leaflet "Check how to keep electronic transaction data").
  9. The file name contains characters that are not allowed. Windows does not allow \ / : * ? " < > | in file names. If a counterparty name contains any of them, replace them with another character.

How long to keep the data

As with paper documents, the retention period for electronic transaction data is set by the Income Tax Act, the Corporation Tax Act and other tax laws (Q17).

See the table in Q17 for when the period starts.

Make file names consistent with Dencho Rename

Once you pass a few dozen files a month, opening each PDF to read the date and amount and typing a name becomes a chore. Dencho Rename was built to automate exactly that step.

Drop PDFs or photo and scan images (PNG, JPEG, HEIC) into Dencho Rename and it reads the date, amount and counterparty from the text, renames every file by the rule you chose, and returns them as a ZIP. You can choose the order, the date format, and whether to shorten 株式会社 to (株). Files are processed only inside your browser and never uploaded.

PDFs with embedded text can be renamed for free (up to 5 files at a time). Image PDFs and photo or scan images are read inside your browser on the paid plan (handwriting is not supported; values read this way are flagged "check" so you can verify them by eye). The index book CSV is available on the free plan too; the dictionary that unifies counterparty names is a paid feature.

Sources