TL;DR: The 5 rules of a good file naming convention
- Start with the date in YYYY-MM-DD format (ISO 8601) so files sort chronologically.
- Use hyphens between words and underscores between fields. No spaces.
- Stick to lowercase letters, digits, hyphens, underscores, and periods.
- Pad numbers with leading zeros:
invoice-007.pdf, notinvoice-7.pdf. - Keep the whole name under 70 characters; describe content, not your filing process.
Good: 2026-06-16_acme_invoice-1042.pdf
Bad: Final Invoice (2) COPY!! 6/16/26.pdf
File names are the cheapest indexing system you'll ever build. A good naming convention turns "where did I save that?" into a one-second sort or search; a bad one turns your Downloads folder into a graveyard of scan001.pdf, IMG_4823.jpg, and Final_v2_FINAL.docx.
This guide covers the rules used by ISO, the U.S. National Archives, university research libraries, and every team that has ever had to find a contract three years later. Everything here applies to Mac, Windows, and Linux. By the end you'll have copy-pasteable templates you can apply to thousands of files in one pass.
What Is a File Naming Convention?
A file naming convention is a documented rule set that defines how files are named across a person, project, team, or organisation. A complete convention answers four questions:
- What goes in the name? (date, project, document type, version, author)
- In what order? (usually date-first, so files sort chronologically)
- In what format? (YYYY-MM-DD for dates, lowercase, hyphens vs underscores)
- What's forbidden? (spaces, special characters, reserved words)
Apply the convention consistently and the file system becomes self-documenting. You don't need a database, a DMS, or a tag taxonomy to find anything. The name IS the metadata.
The YYYY-MM-DD Date Format (ISO 8601)
ISO, NASA, the U.S. Library of Congress, Stanford Libraries, and the UK National Archives all agree on one thing: dates in file names should be written as YYYY-MM-DD, defined by ISO 8601.
| Format | Example | What goes wrong |
|---|---|---|
YYYY-MM-DD | 2026-06-16 | Sorts chronologically, unambiguous globally, ISO 8601 standard. ✓ |
MM-DD-YYYY | 06-16-2026 | U.S. format; sorts by month first, so January 2024 sits next to January 2026. |
DD-MM-YYYY | 16-06-2026 | European format; same sort problem, and ambiguous with U.S. dates. |
DD.MM.YY | 16.06.26 | Two-digit year is ambiguous; dots clash with file extensions on some systems. |
| Month names | June-16-2026 | Sorts alphabetically (April before January); localisation breaks across languages. |
The decisive feature of YYYY-MM-DD is that alphabetical sort equals chronological sort. 2024-12-31 comes before 2025-01-01 in any file browser, on any operating system, in any locale. No other format guarantees that.
Pro tip: Always pad the month and day. Write 2026-06-16, not 2026-6-16. Without the leading zero, 2026-6-... sorts after 2026-10-... alphabetically, which breaks the whole point of dating your files.
Separators: Hyphens vs Underscores vs Spaces
Spaces in file names look fine in Finder or Explorer, then break the moment a file touches a URL, a Terminal command, a Git repository, a backup script, or a cloud sync tool. Replace them with separators.
The two-separator rule used by most data-management guides:
- Hyphen (
-) separates words inside a single field:acme-corporation,website-redesign. - Underscore (
_) separates fields:2026-06-16_acme-corporation_invoice-1042.pdf.
Pick one scheme and stick to it everywhere. Mixing rules is actually worse than picking the "wrong" one. A search for acme_corp won't find acme-corp.
Safe Characters: What's Allowed and What Isn't
A name that works on macOS may explode on Windows, in a ZIP archive, or in a URL. Stick to characters that are safe everywhere:
- Safe:
a-z,A-Z,0-9, hyphen (-), underscore (_), period (.) for the extension only. - Never use:
< > : " / \ | ? *(all illegal on Windows). - Avoid:
# % & { } $ ! ' @, parentheses, brackets. They break URLs and shell scripts. - Don't start or end with: a space, a period, or a hyphen.
- Skip emoji. They look great in Finder but cause problems the moment you sync to OneDrive, S3, or a Linux server.
Reserved Windows Names
Windows still refuses to create files called CON, PRN, AUX, NUL, COM1 through COM9, or LPT1 through LPT9, with or without an extension. Avoid them even on Mac so cross-platform sync doesn't fail silently.
Case Sensitivity
Linux and Git treat Invoice.pdf and invoice.pdf as different files; macOS and Windows usually don't. Pick a case, go with lowercase as your default, and stay consistent.
Versioning: Stop the "Final_FINAL_v2" Loop
Versioning belongs in the name, not in a parenthesis at the end. Two patterns work well:
- Date-versioned: the date is the version.
2026-06-16_proposal-acme.docxfollowed by2026-06-18_proposal-acme.docx. Works well for documents where each edit is a snapshot. - Semantic version: append
-v01,-v02,-v03with leading zeros. Save-finalfor when something concrete, like a signature, a payment, or a publication, actually makes it final.
"Final" on its own means nothing. Let the date handle versioning, or move signed copies into a /signed/ subfolder. That way the filename stays clean and doesn't have to carry information the folder already provides.
The Anatomy of a Great File Name
A repeatable naming convention is a fixed template with variable slots. The order from left to right is critical because file managers sort left to right.
A general-purpose template:
Applied to real files:
Notice what's not in the name: the author (Finder tracks that), the folder location (the folder tracks that), or notes like "final" or "for review" (those rot in a week).
7 Copy-Paste Templates by Use Case
| Use case | Template | Example |
|---|---|---|
| Invoices & receipts | {YYYY-MM-DD}_{vendor}_invoice-{number}.pdf | 2026-06-16_aws_invoice-INV-2042.pdf |
| Contracts | {YYYY-MM-DD}_{counterparty}_{type}-{v##}.pdf | 2026-06-16_acme_msa-v03.pdf |
| Screenshots | {YYYY-MM-DD}_{app}_{what-it-shows}.png | 2026-06-16_figma_homepage-hero-v2.png |
| Photos | {YYYY-MM-DD}_{place}_{subject}-{nnn}.jpg | 2026-06-16_paris_eiffel-tower-007.jpg |
| Reports | {YYYY-Q#}_{project}_{report-type}-{v##}.pdf | 2026-Q2_growth_revenue-report-v01.pdf |
| Code & design exports | {project}_{component}_{v##}.{ext} | website_navbar_v04.svg |
| Personal documents | {YYYY-MM-DD}_{category}_{detail}.pdf | 2026-06-16_tax_w2-employer-name.pdf |
Common Mistakes That Wreck a Convention
- Encoding the folder in the file name. If the folder is already
/Clients/Acme/, you don't need "acme" at the start of every file. Use the name for what the folder doesn't tell you. - Adding metadata that already exists. "Created by Sarah", "JPG image", or "Microsoft Word document" are visible to every operating system. Don't duplicate them.
- Cryptic abbreviations.
q2_yoyrev_fwd.xlsxis unreadable in six months. Spell it out:2026-q2_year-over-year-revenue_forwarded.xlsx. - Mixing conventions over time. Old habits sneak back in. Audit a folder quarterly and bulk-rename anything that drifted.
- Designing a perfect convention you never apply. A flawed convention applied to 100% of files beats a beautiful one applied to 30%.
Applying a Convention Without Manually Renaming Files
Designing the rules is the easy part. Renaming five years of accumulated files is what stops most people. There are three honest ways to do it:
| Approach | Good for | The catch |
|---|---|---|
| Rule-based renaming (Finder, Bulk Rename Utility, Hazel) | Files that already have a parseable date or pattern in the name | Can't read what's inside a PDF or image. It only acts on what's already in the filename. |
| Metadata-based renaming | Photos and videos with EXIF dates, GPS, camera model | PDFs, screenshots, and scans rarely have useful metadata |
| Content-based AI renaming | Mixed inboxes: invoices, contracts, receipts, scans, screenshots. For these files, the content is the only reliable source of a date or vendor. | Requires an AI-aware tool; quality depends on the model |
FilesDesk is the third kind. It reads the contents of each file (invoice header, contract title, image subject) and rewrites the filename using a template you control:
Drop a folder of scan001.pdf, scan002.pdf, scan003.pdf in, and you get back 2026-03-04_aws_invoice-INV-2042.pdf, 2026-03-11_stripe_receipt-CH-9911.pdf, 2026-03-19_acme_contract-msa-v02.pdf. The convention applies itself.
Pair it with a Watch Folder on your Downloads or Scanner Inbox and every new file lands already named to spec. See the deeper dives for specific types: renaming PDFs by content, auto-renaming screenshots, and EXIF-based photo renaming.
Apply Your Naming Convention to Every File
FilesDesk reads file content with AI and renames thousands of files to your template in one pass. Free to try. No card required.
Download FilesDesk FreeQuick Audit: Is Your Convention Working?
Open your most-used folder and check:
- Sort by name. Are files now in chronological order? If not, your date format is wrong.
- Pick a random file from a year ago. Can you tell what it is without opening it? If not, your name is too cryptic.
- Search for one vendor or project. Does the search return everything related? If not, your vocabulary is inconsistent.
- Try the file name as a URL slug. Does it survive without escaping? If not, you still have spaces or unsafe characters.
If any of those fail, the convention isn't yet doing its job. Tighten the template, batch-rename what's there, and automate the next thousand files so the drift stops.
Frequently Asked Questions
What is the best date format for file names?
YYYY-MM-DD (ISO 8601). It sorts chronologically with simple alphabetical sort, removes ambiguity between U.S. and European date orders, and is the format recommended by ISO, NASA, the U.S. National Archives, and most university research data guides.
Should I use spaces, dashes, or underscores in file names?
Avoid spaces. Use hyphens (-) between words and underscores (_) between fields. Spaces break URLs, command-line tools, and many backup or sync scripts.
What characters are not allowed in file names?
Across Windows, macOS, and Linux, avoid < > : " / \ | ? * and all control characters. Also avoid leading or trailing spaces, leading dots, emoji, and the reserved Windows names CON, PRN, AUX, NUL, COM1 through COM9, and LPT1 through LPT9.
How long should a file name be?
Aim for under 70 characters. Windows enforces a 260-character total path limit by default. Shorter names are easier to read at a glance, survive being zipped or moved into deeper folder structures, and don't get truncated in dialogue boxes.
Is YYYY-MM-DD an ISO standard?
Yes. ISO 8601 defines YYYY-MM-DD as the standard date representation. It is the only common date format where alphabetical sort matches chronological order, which is why archives and data repositories standardise on it for filenames.
How can I rename hundreds of files to a naming convention quickly?
Use FilesDesk to apply a template, for example {YYYY-MM-DD}_{vendor}_{type}-{number}, to a whole folder in one pass. It reads each file's content with AI to extract the date, vendor, and document type, then writes the name to spec. Add a Watch Folder so new files land already named.
The Bottom Line
A file naming convention is a 10-minute decision that saves hours every month. Anchor every name with YYYY-MM-DD, separate fields cleanly, avoid characters that break in URLs and shells, and let the name describe the content, not your filing process.
Once the convention is written down, the only remaining problem is applying it. Manual renaming gets it onto today's files; automation gets it onto every file from here forward.
Further reading: set up Watch Folders for automatic file renaming, rename PDFs by content on Mac, and the AI file organizer for Mac.